diff --git a/src/unix/kqueue.c b/src/unix/kqueue.c index a80b7d14..dc642034 100644 --- a/src/unix/kqueue.c +++ b/src/unix/kqueue.c @@ -168,11 +168,10 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { for (i = 0; i < nfds; i++) { ev = events + i; fd = ev->ident; - w = loop->watchers[fd]; - /* Skip invalidated events, see uv__platform_invalidate_fd */ if (fd == -1) continue; + w = loop->watchers[fd]; if (w == NULL) { /* File descriptor that we've stopped watching, disarm it. */