Skip to content

Commit

Permalink
src: keep PipeWrap::Open function consistent with TCPWrap
Browse files Browse the repository at this point in the history
  • Loading branch information
theanarkh committed Jan 2, 2023
1 parent 28fe494 commit 2f2f384
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pipe_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ 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 2f2f384

Please sign in to comment.