From: Anthony Minessale Date: Tue, 21 Aug 2012 14:58:23 +0000 (-0500) Subject: add timeout X-Git-Tag: v1.2.3^2~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dcf89e4721bae13f3dcc1db35d1bc4c92b12764;p=thirdparty%2Ffreeswitch.git add timeout --- diff --git a/src/switch_core_session.c b/src/switch_core_session.c index b905d551f7..8e02b2e325 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -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); }