Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
src: extract common DoBind and DoConnect methods#22315
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
maclover7 commented Aug 14, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Aug 14, 2018
jasnell commented Aug 14, 2018
The change looks fine but can you include a quick description of the rationale in the commit log and PR description? |
maclover7 commented Aug 16, 2018
addaleax commented Aug 19, 2018
joyeecheung commented Aug 20, 2018
This PR needs a rebase against master to avoid the git failure in the CI. |
addaleax commented Aug 25, 2018
@maclover7 Can you rebase? |
jasnell commented Sep 10, 2018
Ping @maclover7 |
maclover7 commented Nov 29, 2018
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication.
addaleax left a comment
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.
Still LGTM
maclover7 commented Nov 30, 2018
maclover7 commented Dec 3, 2018
Passing Resume Build: https://ci.nodejs.org/job/node-test-pull-request/19153/ |
maclover7 commented Dec 3, 2018
Could use another review or two @nodejs/collaborators |
indutny left a comment
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.
LGTM if CI is happy. Thanks!
src/tcp_wrap.cc Outdated
| sockaddr_in addr; | ||
| int err = uv_ip4_addr(*ip_address, port, &addr); | ||
| if (family == AF_INET6 && | ||
| !args[2]->Uint32Value(env->context()).To(&flags)) return; |
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.
Does this pass lint? I'd rather put return on a next line and add braces on this line and the line after return.
ronkorving commented Dec 5, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I have to share a somewhat amusing observation that while the intention of this PR is to reduce code (redundancy), GitHub measures it to remove as many lines as it adds (+23 −23). While I can appreciate the sentiment, I see this as increasing complexity in order to remove code duplication, shrinking the code base by 0 lines. -0 on this one. |
maclover7 commented Dec 17, 2018 • edited by Trott
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by Trott
Uh oh!
There was an error while loading. Please reload this page.
Fixed @indutny's comment New CI: https://ci.nodejs.org/job/node-test-pull-request/19590/ ✔️ |
maclover7 commented Dec 17, 2018
Landed in 4b96a2a |
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. PR-URL: #22315 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. PR-URL: #22315 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. PR-URL: nodejs#22315 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. Backport-PR-URL: nodejs#28222 PR-URL: nodejs#22315 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. Backport-PR-URL: #28222 PR-URL: #22315 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. Backport-PR-URL: #28222 PR-URL: #22315 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
TCPWrap::BindandTCPWrap::Bind6share a large amount of functionality, so a commonDoBindwas extracted to remove duplication.TCPWrap::Connect/TCPWrap::Connect6follow this same pattern, soDoConnectwas extracted from those two methods to also remove duplication.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes