fix typo in `janet_epoll_sync_callback`

JANET_ASYNC_LISTEN_WRITE was checked instead of JANET_ASYNC_EVENT_READ.
This caused ev/read to hang if it was called on a normal fd.
This commit is contained in:
Ian Shehadeh 2022-01-06 19:33:34 -05:00
parent 199ec36d40
commit 938c5013c9
1 changed files with 1 additions and 1 deletions

View File

@ -1434,7 +1434,7 @@ static void janet_epoll_sync_callback(JanetEVGenericMessage msg) {
JanetAsyncStatus status2 = JANET_ASYNC_STATUS_NOT_DONE;
if (state->stream->_mask & JANET_ASYNC_LISTEN_WRITE)
status1 = state->machine(state, JANET_ASYNC_EVENT_WRITE);
if (state->stream->_mask & JANET_ASYNC_LISTEN_WRITE)
if (state->stream->_mask & JANET_ASYNC_LISTEN_READ)
status2 = state->machine(state, JANET_ASYNC_EVENT_READ);
if (status1 == JANET_ASYNC_STATUS_DONE ||
status2 == JANET_ASYNC_STATUS_DONE) {