Skip to content

Commit

Permalink
add back error handling that was incorrectly dropped by libuv#4030
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Nov 6, 2023
1 parent bd23c63 commit 91a2812
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/unix/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,22 @@ void uv_pipe_connect(uv_connect_t* req,
uv_pipe_t* handle,
const char* name,
uv_connect_cb cb) {
uv_pipe_connect2(req, handle, name, strlen(name), 0, cb);
int err;

err = uv_pipe_connect2(req, handle, name, strlen(name), 0, cb);

if (err) {
handle->delayed_error = err;
handle->connect_req = req;

uv__req_init(handle->loop, req, UV_CONNECT);
req->handle = (uv_stream_t*)handle;
req->cb = cb;
uv__queue_init(&req->queue);

/* Force callback to run on next tick in case of error. */
uv__io_feed(handle->loop, &handle->io_watcher);
}
}


Expand Down

0 comments on commit 91a2812

Please sign in to comment.