Skip to content

Commit e5729ba

Browse files
author
skladis
committed
chech again schannel->state after waking up
1 parent d73f575 commit e5729ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app-unimrcp/speech_channel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ int speech_channel_destroy(speech_channel_t *schannel)
363363
ast_log(LOG_DEBUG, "(%s) Waiting for MRCP session to terminate\n", schannel->name);
364364
if (schannel->state != SPEECH_CHANNEL_CLOSED) {
365365
if (schannel->cond != NULL) {
366-
if (apr_thread_cond_timedwait(schannel->cond, schannel->mutex, globals.speech_channel_timeout) == APR_TIMEUP) {
366+
if ((apr_thread_cond_timedwait(schannel->cond, schannel->mutex, globals.speech_channel_timeout) == APR_TIMEUP) && (schannel->state != SPEECH_CHANNEL_CLOSED)) {
367367
ast_log(LOG_WARNING, "(%s) MRCP session has not terminated after %" APR_TIME_T_FMT " ms\n", schannel->name, apr_time_as_msec(globals.speech_channel_timeout));
368368
}
369369
}

0 commit comments

Comments
 (0)