diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index e6236a6e529864..7118a9e573f4c2 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -91,7 +91,7 @@ int StreamWrap::GetFD() { int fd = -1; #if !defined(_WIN32) if (stream() != nullptr) - fd = stream()->io_watcher.fd; + uv_fileno(reinterpret_cast(stream()), &fd); #endif return fd; }