mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: keep PipeWrap::Open function consistent with TCPWrap
PR-URL: https://github.com/nodejs/node/pull/46064 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
a42fc512b6
commit
ca8ff08a5c
1 file changed
+2
-3
+2
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user