From c17486803a43e980f48cfa6383d84df8525691a3 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 22 Jun 2009 19:18:55 +0000 Subject: [PATCH] Ticket #891: fixed deadlock on pjlib-test ioqueue unregister stress test. This seems to have fixed the Bus error too git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2782 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pjlib-test/ioq_unreg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pjlib/src/pjlib-test/ioq_unreg.c b/pjlib/src/pjlib-test/ioq_unreg.c index ab47c7949..5b320964a 100644 --- a/pjlib/src/pjlib-test/ioq_unreg.c +++ b/pjlib/src/pjlib-test/ioq_unreg.c @@ -250,11 +250,12 @@ static int perform_unreg_test(pj_ioqueue_t *ioqueue, PJ_TIME_VAL_GTE(now, time_to_unregister) && sock_data.pool) { - pj_mutex_lock(sock_data.mutex); + //Can't do this otherwise it'll deadlock + //pj_mutex_lock(sock_data.mutex); sock_data.unregistered = 1; pj_ioqueue_unregister(sock_data.key); - pj_mutex_unlock(sock_data.mutex); + //pj_mutex_unlock(sock_data.mutex); pj_mutex_destroy(sock_data.mutex); pj_pool_release(sock_data.pool); sock_data.pool = NULL;