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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
theanarkh authored and juanarbol committed Jan 31, 2023
1 parent 5539977 commit b454a76
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 b454a76

Please sign in to comment.