Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc cleanup of node_report_utils.cc #25960

Merged
merged 3 commits into from
Feb 8, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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: #25960
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
cjihrig committed Feb 8, 2019
commit 39171d755d3e81f03ac0fd716cd80c2e20882fb6
6 changes: 3 additions & 3 deletions src/node_report_utils.cc
Original file line number Diff line number Diff line change
@@ -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;