Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix fs_event refcount bug on darwin
Browse files Browse the repository at this point in the history
The event loop got unref'd twice when the handle was closed.
  • Loading branch information
bnoordhuis committed Feb 29, 2012
1 parent 2f886c8 commit 0459097
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/unix/kqueue.c
Expand Up @@ -69,11 +69,12 @@ static void uv__fs_event(EV_P_ ev_io* w, int revents) {

handle->cb(handle, NULL, events, 0);

uv__fs_event_stop(handle);
if (handle->fd == -1)
return;

/* File watcher operates in one-shot mode, re-arm it. */
if (handle->fd != -1)
uv__fs_event_start(handle);
uv__fs_event_stop(handle);
uv__fs_event_start(handle);
}


Expand Down

0 comments on commit 0459097

Please sign in to comment.