mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -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
5539977f80
commit
b454a7665d
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