only check for and process read/write events if status is success

This commit is contained in:
Eli Lindsey 2020-09-10 10:59:12 -04:00
parent bda845ce43
commit 71521626d9
1 changed files with 18 additions and 17 deletions

View File

@ -134,8 +134,8 @@ static void
getdns_libuv_cb(uv_poll_t *poll, int status, int events)
{
getdns_eventloop_event *el_ev = (getdns_eventloop_event *)poll->data;
(void)status;
if (status == 0) {
if (events & UV_READABLE) {
assert(el_ev->read_cb);
DEBUG_UV("enter libuv_read_cb(el_ev = %p, el_ev->ev = %p)\n"
@ -154,6 +154,7 @@ getdns_libuv_cb(uv_poll_t *poll, int status, int events)
assert(ASSERT_UNREACHABLE);
}
}
}
static void
#ifdef HAVE_NEW_UV_TIMER_CB