unix: fix fs_event refcount bug on darwin
The event loop got unref'd twice when the handle was closed.
This commit is contained in:
parent
44c9f63cb1
commit
b3fe183040
@ -68,11 +68,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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user