Fixed #1565: deadlock in DNS resolver.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@4220 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
37de76e0dc
commit
911260c3cb
|
@ -1248,6 +1248,9 @@ static void on_timeout( pj_timer_heap_t *timer_heap,
|
|||
pj_hash_set(NULL, resolver->hquerybyid, &q->id, sizeof(q->id), 0, NULL);
|
||||
pj_hash_set(NULL, resolver->hquerybyres, &q->key, sizeof(q->key), 0, NULL);
|
||||
|
||||
/* Workaround for deadlock problem in #1565 (similar to #1108) */
|
||||
pj_mutex_unlock(resolver->mutex);
|
||||
|
||||
/* Call application callback, if any. */
|
||||
if (q->cb)
|
||||
(*q->cb)(q->user_data, PJ_ETIMEDOUT, NULL);
|
||||
|
@ -1260,6 +1263,9 @@ static void on_timeout( pj_timer_heap_t *timer_heap,
|
|||
cq = cq->next;
|
||||
}
|
||||
|
||||
/* Workaround for deadlock problem in #1565 (similar to #1108) */
|
||||
pj_mutex_lock(resolver->mutex);
|
||||
|
||||
/* Clear data */
|
||||
q->timer_entry.id = 0;
|
||||
q->user_data = NULL;
|
||||
|
|
Loading…
Reference in New Issue