-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
src: pull AfterConnect from pipe_wrap and tcp_wrap #8448
Conversation
This commit attempts to address one of the items in nodejs#4641 which is related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both pipe_wrap.cc and tcp_wrap.cc contain an AfterConnect function that are almost identical. This commit extracts this function into ConnectionWrap so that that both can share it.
} else { | ||
readable = uv_is_readable(req->handle) != 0; | ||
writable = uv_is_writable(req->handle) != 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm uncertain if this is alright for TCPWrap or not (TCPWrap always set these arguments to true) and wanted to open the PR to get some feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be alright. The TCP sockets that libuv creates are always readable+writable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LGTM |
CI failure looks infra related and unrelated to this change. |
LGTM |
2 similar comments
LGTM |
LGTM |
This commit attempts to address one of the items in nodejs#4641 which is related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both pipe_wrap.cc and tcp_wrap.cc contain an AfterConnect function that are almost identical. This commit extracts this function into ConnectionWrap so that that both can share it. PR-URL: nodejs#8448 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Thanks for the reviews! Landed in 83a354c |
This commit attempts to address one of the items in #4641 which is related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both pipe_wrap.cc and tcp_wrap.cc contain an AfterConnect function that are almost identical. This commit extracts this function into ConnectionWrap so that that both can share it. PR-URL: #8448 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
should this be backported to v4? |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
src
Description of change
This commit attempts to address one of the items in
#4641 which is related to
src/pipe_wrap.cc and src/tcp_wrap.cc.
Currently both pipe_wrap.cc and tcp_wrap.cc contain an AfterConnect
function that are almost identical. This commit extracts this function
into ConnectionWrap so that that both can share it.