From 63a84609fb24b245838f2d0838d5141d36f09f83 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 17 Mar 2018 22:34:38 +0100 Subject: src: store fd for libuv streams on Windows On Windows, we can't just look up a FD for libuv streams and return it in `GetFD()`. However, we do sometimes construct streams from their FDs; in those cases, it should be okay to store the value on a class field. PR-URL: https://github.com/nodejs/node/pull/19377 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- src/pipe_wrap.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pipe_wrap.cc') diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 7ec5bdf15b..f3a88a2ecc 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -204,6 +204,7 @@ void PipeWrap::Open(const FunctionCallbackInfo& args) { int fd = args[0]->Int32Value(); int err = uv_pipe_open(&wrap->handle_, fd); + wrap->set_fd(fd); if (err != 0) env->isolate()->ThrowException(UVException(err, "uv_pipe_open")); -- cgit v1.2.3