From b6a6cde728b99fe8906fafe074cd4a43698d4dc3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 3 Jul 2015 11:41:49 -0500 Subject: [PATCH] FS-7486 --- src/switch_core_session.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 5c0eef4a4d..4573434492 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -1862,9 +1862,10 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread_pool_manager(switch_t xsleep = 10000; } - switch_mutex_lock(session_manager.cond2_mutex); - switch_thread_cond_timedwait(session_manager.cond, session_manager.cond_mutex, xsleep); - switch_mutex_unlock(session_manager.cond2_mutex); + if (switch_mutex_trylock(session_manager.cond2_mutex) == SWITCH_STATUS_SUCCESS) { + switch_thread_cond_timedwait(session_manager.cond, session_manager.cond_mutex, xsleep); + switch_mutex_unlock(session_manager.cond2_mutex); + } if (switch_micro_time_now() >= next) {