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
This commit is contained in:
Benny Prijono 2009-06-22 19:18:55 +00:00
parent 940d3f625a
commit c17486803a
1 changed files with 3 additions and 2 deletions

View File

@ -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;