sunos: improve fs event watcher OOM handling (#4759)
Propagate errors from uv__io_init_start() back to the caller. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
parent
414a5e7333
commit
e6c0007fae
@ -546,8 +546,15 @@ int uv_fs_event_start(uv_fs_event_t* handle,
|
||||
}
|
||||
|
||||
if (first_run) {
|
||||
uv__io_init(&handle->loop->fs_event_watcher, uv__fs_event_read, portfd);
|
||||
uv__io_start(handle->loop, &handle->loop->fs_event_watcher, POLLIN);
|
||||
err = uv__io_init_start(handle->loop,
|
||||
&handle->loop->fs_event_watcher,
|
||||
uv__fs_event_read,
|
||||
portfd,
|
||||
POLLIN);
|
||||
if (err)
|
||||
uv__handle_stop(handle);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user