diff --git a/src/switch_core_memory.c b/src/switch_core_memory.c index 4a0ad30423..8b328e6c38 100644 --- a/src/switch_core_memory.c +++ b/src/switch_core_memory.c @@ -569,12 +569,8 @@ void switch_core_memory_stop(void) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping memory pool queue.\n"); - memory_manager.pool_thread_running = -1; + memory_manager.pool_thread_running = 0; switch_thread_join(&st, pool_thread_p); - - while (memory_manager.pool_thread_running) { - switch_cond_next(); - } #endif }