Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
src: keep PipeWrap::Open function consistent with TCPWrap
PR-URL: #46064
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • 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
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.