diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 72bf28f73f..8b21c79b10 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -8413,15 +8413,12 @@ static void *iax2_process_thread(void *data) /* Someone grabbed our thread *right* after we timed out. * Wait for them to set us up with something to do and signal * us to continue. */ - ast_cond_timedwait(&thread->cond, &thread->lock, &ts); - ast_mutex_unlock(&thread->lock); + ast_cond_wait(&thread->cond, &thread->lock); } - if (!t) - ast_mutex_unlock(&thread->lock); } else { ast_cond_wait(&thread->cond, &thread->lock); - ast_mutex_unlock(&thread->lock); } + ast_mutex_unlock(&thread->lock); /* Add ourselves to the active list now */ AST_LIST_LOCK(&active_list);