mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-05 04:35:46 +00:00
FS-6440 --resolve
This commit is contained in:
parent
ed7264b6d3
commit
0f62c4cd62
@ -1827,10 +1827,17 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread_pool_manager(switch_t
|
|||||||
|
|
||||||
while(session_manager.ready) {
|
while(session_manager.ready) {
|
||||||
int check = 1;
|
int check = 1;
|
||||||
|
int ttl = 0;
|
||||||
|
|
||||||
switch_mutex_lock(session_manager.cond2_mutex);
|
switch_mutex_lock(session_manager.mutex);
|
||||||
switch_thread_cond_timedwait(session_manager.cond, session_manager.cond_mutex, sleep);
|
ttl = switch_queue_size(session_manager.thread_queue);
|
||||||
switch_mutex_unlock(session_manager.cond2_mutex);
|
switch_mutex_unlock(session_manager.mutex);
|
||||||
|
|
||||||
|
if (!ttl) {
|
||||||
|
switch_mutex_lock(session_manager.cond2_mutex);
|
||||||
|
switch_thread_cond_timedwait(session_manager.cond, session_manager.cond_mutex, sleep);
|
||||||
|
switch_mutex_unlock(session_manager.cond2_mutex);
|
||||||
|
}
|
||||||
|
|
||||||
if (switch_micro_time_now() >= next) {
|
if (switch_micro_time_now() >= next) {
|
||||||
if (session_manager.popping) {
|
if (session_manager.popping) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user