diff options
author | Saúl Ibarra Corretgé <saghul@gmail.com> | 2016-05-18 15:13:04 +0100 |
---|---|---|
committer | Saúl Ibarra Corretgé <saghul@gmail.com> | 2016-05-19 09:54:13 +0100 |
commit | 4fe1d6e75fe6daa19150038c7fdb2de0f91c10fa (patch) | |
tree | d775abd6b28096f60f7627f496f51db4043604e7 /src | |
parent | f94ebb00d40917e0f1c7824ed3bba58987a8eb2e (diff) | |
download | android-node-v8-4fe1d6e75fe6daa19150038c7fdb2de0f91c10fa.tar.gz android-node-v8-4fe1d6e75fe6daa19150038c7fdb2de0f91c10fa.tar.bz2 android-node-v8-4fe1d6e75fe6daa19150038c7fdb2de0f91c10fa.zip |
unix,stream: fix getting the correct fd for a handle
On OSX it's possible that the fd is replaced, so use the proper libuv
API to get the correct fd.
PR-URL: https://github.com/nodejs/node/pull/6753
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/stream_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 695e917e02..b942e48078 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -86,7 +86,7 @@ int StreamWrap::GetFD() { int fd = -1; #if !defined(_WIN32) if (stream() != nullptr) - fd = stream()->io_watcher.fd; + uv_fileno(reinterpret_cast<uv_handle_t*>(stream()), &fd); #endif return fd; } |