FS-3373 --resolve

This commit is contained in:
Anthony Minessale 2011-06-27 10:01:06 -05:00
parent 8a8b70b7a4
commit dfc30b2e67
1 changed files with 9 additions and 1 deletions

View File

@ -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;
}