[Freeswitch-svn] [commit] r5841 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Thu Oct 11 15:12:18 EDT 2007


Author: anthm
Date: Thu Oct 11 15:12:18 2007
New Revision: 5841

Modified:
   freeswitch/trunk/src/switch_core_state_machine.c

Log:
fix race on creating new session thread vs. setting init state causing hung channels

Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c	(original)
+++ freeswitch/trunk/src/switch_core_state_machine.c	Thu Oct 11 15:12:18 2007
@@ -431,7 +431,11 @@
 
 
 		if (midstate == endstate) {
-			switch_thread_cond_wait(session->cond, session->mutex);
+			if (endstate == CS_NEW) {
+				switch_yield(1000);
+			} else {
+				switch_thread_cond_wait(session->cond, session->mutex);
+			}
 		}
 
 	}



More information about the Freeswitch-svn mailing list