Some protection to prevent ICE session from being destroyed while callback is still running
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1574 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
5b409a4347
commit
e74315f8e5
|
@ -336,6 +336,12 @@ static void destroy_ice(pj_ice_sess *ice,
|
|||
LOG4((ice->obj_name, "Destroying ICE session"));
|
||||
}
|
||||
|
||||
/* Let other callbacks finish */
|
||||
if (ice->mutex) {
|
||||
pj_mutex_lock(ice->mutex);
|
||||
pj_mutex_unlock(ice->mutex);
|
||||
}
|
||||
|
||||
if (ice->completion_timer.id) {
|
||||
pj_timer_heap_cancel(ice->stun_cfg.timer_heap,
|
||||
&ice->completion_timer);
|
||||
|
|
Loading…
Reference in New Issue