Skip to content

Commit

Permalink
Don't restart retransmit timer when transport is pending (IP change s…
Browse files Browse the repository at this point in the history
…cenario) (#4037)
  • Loading branch information
nanangizz authored Aug 16, 2024
1 parent afc03db commit 5d7e274
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pjsip/src/pjsip/sip_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -2369,6 +2369,8 @@ static void tsx_tp_state_callback( pjsip_transport *tp,

tsx = (pjsip_transaction*)info->user_data;

tsx->transport_flag &= ~(TSX_HAS_PENDING_TRANSPORT);

/* Post the event for later processing, to avoid deadlock.
* See https://github.com/pjsip/pjproject/issues/1646
*/
Expand Down Expand Up @@ -2692,6 +2694,13 @@ static pj_status_t tsx_retransmit( pjsip_transaction *tsx, int resched)
return status;
}

/* Cancel retransmission timer if transport is pending. */
if (resched && (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT))
{
tsx_cancel_timer( tsx, &tsx->retransmit_timer );
tsx->transport_flag |= TSX_HAS_PENDING_RESCHED;
}

return PJ_SUCCESS;
}

Expand Down

0 comments on commit 5d7e274

Please sign in to comment.