]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
wait for threads to end on shutdown
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 4 Dec 2012 22:04:16 +0000 (16:04 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 4 Dec 2012 22:04:16 +0000 (16:04 -0600)
src/switch_core_session.c

index c2fb0ea8d68c2df1efe9788e03664d5fc462ac2c..74dae6e68a706817ab69327c763ccb91c3fb8f9e 100644 (file)
@@ -1688,6 +1688,12 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread_pool_manager(switch_t
 
                check_queue();
        }
+
+       while(session_manager.running) {
+               switch_queue_trypush(session_manager.thread_queue, NULL);
+               switch_yield(20000);
+       }
+
        
        return NULL;
 }