From 013222bba34cdb99bd1785b37d392cec33225922 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 28 Jun 2010 08:49:24 -0500 Subject: [PATCH] wait for state change --- src/mod/languages/mod_spidermonkey/mod_spidermonkey.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index 09af60f9cb..4f6c7aadc4 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -2864,6 +2864,7 @@ static JSBool session_construct(JSContext * cx, JSObject * obj, uintN argc, jsva &jss->session, &jss->cause, uuid, 60, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL) == SWITCH_STATUS_SUCCESS) { switch_set_flag(jss, S_HUP); switch_channel_set_state(switch_core_session_get_channel(jss->session), CS_SOFT_EXECUTE); + switch_channel_wait_for_state_timeout(switch_core_session_get_channel(jss->session), CS_SOFT_EXECUTE, 5000); *rval = BOOLEAN_TO_JSVAL(JS_TRUE); } else { *rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, switch_channel_cause2str(jss->cause)));