Skip to content

Commit 5d7e274

Browse files
authored
Don't restart retransmit timer when transport is pending (IP change scenario) (#4037)
1 parent afc03db commit 5d7e274

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pjsip/src/pjsip/sip_transaction.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,8 @@ static void tsx_tp_state_callback( pjsip_transport *tp,
23692369

23702370
tsx = (pjsip_transaction*)info->user_data;
23712371

2372+
tsx->transport_flag &= ~(TSX_HAS_PENDING_TRANSPORT);
2373+
23722374
/* Post the event for later processing, to avoid deadlock.
23732375
* See https://github.com/pjsip/pjproject/issues/1646
23742376
*/
@@ -2692,6 +2694,13 @@ static pj_status_t tsx_retransmit( pjsip_transaction *tsx, int resched)
26922694
return status;
26932695
}
26942696

2697+
/* Cancel retransmission timer if transport is pending. */
2698+
if (resched && (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT))
2699+
{
2700+
tsx_cancel_timer( tsx, &tsx->retransmit_timer );
2701+
tsx->transport_flag |= TSX_HAS_PENDING_RESCHED;
2702+
}
2703+
26952704
return PJ_SUCCESS;
26962705
}
26972706

0 commit comments

Comments
 (0)