From dfc30b2e6751b5a97d9b59cab5d9e0b94ebcd3b4 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 27 Jun 2011 10:01:06 -0500 Subject: [PATCH] FS-3373 --resolve --- src/switch_ivr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 92eb97ef12..6c1202a4ed 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -151,7 +151,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session, */ if (!switch_channel_media_ready(channel)) { - switch_yield(ms * 1000); + + for (elapsed=0; elapsed<(ms/20); elapsed++) { + if (switch_channel_test_flag(channel, CF_BREAK)) { + switch_channel_clear_flag(channel, CF_BREAK); + return SWITCH_STATUS_BREAK; + } + + switch_yield(20 * 1000); + } return SWITCH_STATUS_SUCCESS; } -- 2.47.3