Merge pull request #174 from signalwire/log_leaks_on_shutdown
[Core] Wait for all EVENT_DISPATCH_QUEUE_THREADS before killing the logging which leaks otherwise.
This commit is contained in:
commit
efc10bc190
|
@ -571,11 +571,13 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping dispatch threads\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping dispatch threads\n");
|
||||||
|
|
||||||
for(x = 0; x < (uint32_t)DISPATCH_THREAD_COUNT; x++) {
|
for(x = 0; x < (uint32_t)MAX_DISPATCH; x++) {
|
||||||
|
if (EVENT_DISPATCH_QUEUE_THREADS[x]) {
|
||||||
switch_status_t st;
|
switch_status_t st;
|
||||||
switch_thread_join(&st, EVENT_DISPATCH_QUEUE_THREADS[x]);
|
switch_thread_join(&st, EVENT_DISPATCH_QUEUE_THREADS[x]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
x = 0;
|
x = 0;
|
||||||
while (x < 100 && THREAD_COUNT) {
|
while (x < 100 && THREAD_COUNT) {
|
||||||
|
|
Loading…
Reference in New Issue