Skip to content

Commit

Permalink
src: keep PipeWrap::Open function consistent with TCPWrap
Browse files Browse the repository at this point in the history
PR-URL: #46064
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
theanarkh authored Jan 6, 2023
1 parent 4788c0d commit 9e86c49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pipe_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,9 @@ void PipeWrap::Open(const FunctionCallbackInfo<Value>& args) {
if (!args[0]->Int32Value(env->context()).To(&fd)) return;

int err = uv_pipe_open(&wrap->handle_, fd);
wrap->set_fd(fd);
if (err == 0) wrap->set_fd(fd);

if (err != 0)
env->ThrowUVException(err, "uv_pipe_open");
args.GetReturnValue().Set(err);
}


Expand Down

0 comments on commit 9e86c49

Please sign in to comment.