1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-04-07 21:32:56 +00:00

more efficient check

This commit is contained in:
Michael Jerris 2010-04-26 01:13:10 -04:00
parent b1f9dc416d
commit b2ec65a10a

@ -786,7 +786,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event_timed(esl_handle_t *handle, uint32_t ms
return ESL_FAIL;
}
if (esl_mutex_trylock(handle->mutex) != ESL_SUCCESS) {
if (activity == 0 || !FD_ISSET(handle->sock, &rfds) || (esl_mutex_trylock(handle->mutex) != ESL_SUCCESS)) {
return ESL_BREAK;
}