0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

report: widen scope of #ifndef

This commit moves a #ifndef _WIN32 to contain the entire if
statement that inspects file descriptors. Prior to this commit,
the #ifndef was inside the if, making it essentially dead code
on Windows.

PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
cjihrig 2019-02-06 08:57:18 -05:00
parent 4b4d46539d
commit 39171d755d
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -163,12 +163,12 @@ void WalkHandle(uv_handle_t* h, void* arg) {
<< ", recv buffer size: " << recv_size;
}
#ifndef _WIN32
if (h->type == UV_TCP || h->type == UV_NAMED_PIPE || h->type == UV_TTY ||
h->type == UV_UDP || h->type == UV_POLL) {
uv_os_fd_t fd_v;
int rc = uv_fileno(h, &fd_v);
// uv_os_fd_t is an int on Unix and HANDLE on Windows.
#ifndef _WIN32
if (rc == 0) {
switch (fd_v) {
case 0:
@ -185,8 +185,8 @@ void WalkHandle(uv_handle_t* h, void* arg) {
break;
}
}
#endif
}
#endif
if (h->type == UV_TCP || h->type == UV_NAMED_PIPE || h->type == UV_TTY) {
data << ", write queue size: " << handle->stream.write_queue_size;