Skip to content

Commit 5088932

Browse files
authored
Prevent call hangup retry if call already terminated (#4417)
1 parent cfb5d25 commit 5088932

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pjsip/src/pjsua-lib/pjsua_call.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3074,7 +3074,9 @@ static pj_status_t call_inv_end_session(pjsua_call *call,
30743074
* pjsua_call_on_state_changed() to be called and call to be reset,
30753075
* so we need to check for call->inv as well.
30763076
*/
3077-
if (status != PJ_SUCCESS && call->inv) {
3077+
if (status != PJ_SUCCESS && status != PJSIP_ESESSIONTERMINATED &&
3078+
call->inv)
3079+
{
30783080
pj_time_val delay;
30793081

30803082
/* Schedule a retry */

0 commit comments

Comments
 (0)