Skip to content

Commit

Permalink
check again schannel->state after waking up
Browse files Browse the repository at this point in the history
  • Loading branch information
skladis committed Aug 30, 2024
1 parent d73f575 commit 73a32d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app-unimrcp/speech_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ int speech_channel_destroy(speech_channel_t *schannel)
ast_log(LOG_DEBUG, "(%s) Waiting for MRCP session to terminate\n", schannel->name);
if (schannel->state != SPEECH_CHANNEL_CLOSED) {
if (schannel->cond != NULL) {
if (apr_thread_cond_timedwait(schannel->cond, schannel->mutex, globals.speech_channel_timeout) == APR_TIMEUP) {
if ((apr_thread_cond_timedwait(schannel->cond, schannel->mutex, globals.speech_channel_timeout) == APR_TIMEUP) && (schannel->state != SPEECH_CHANNEL_CLOSED)) {
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));
}
}
Expand Down

0 comments on commit 73a32d9

Please sign in to comment.