]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add timeout
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 21 Aug 2012 14:58:23 +0000 (09:58 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 21 Aug 2012 14:58:27 +0000 (09:58 -0500)
src/switch_core_session.c

index b905d551f7a0096b32b220e90b7c75b235a66403..8e02b2e32587638ef2401ed6f60dd02c8b7d3514 100644 (file)
@@ -2200,10 +2200,12 @@ void switch_core_session_init(switch_memory_pool_t *pool)
 
 void switch_core_session_uninit(void)
 {
+       int sanity = 100;
+
        switch_core_hash_destroy(&session_manager.session_table);
        session_manager.ready = 0;
 
-       while(session_manager.running) {
+       while(session_manager.running && --sanity > 0) {
                switch_queue_interrupt_all(session_manager.thread_queue);
                switch_yield(100000);
        }