Uh oh!
There was an error while loading. Please reload this page.
net: persist net.Socket options before connect - #1518
Conversation
There was a problem hiding this comment.
Is there a reason why the ternary is here instead of just passing in enable? Is it the .bind perf?
silverwind
commented
May 8, 2015
Regarding tests: I'm not sure if it's possibly to test |
silverwind
commented
May 16, 2015
I'll LGTM this one. Given the fact that both |
evanlucas
commented
May 16, 2015
Ok. I'll land tomorrow provided @bnoordhuis is ok with it also |
102a993 to
6051035Compareevanlucas
commented
May 19, 2015
There was a problem hiding this comment.
Maybe assert.equal(typeof connection.setKeepAlive, 'function')?
6051035 to
a903fc1CompareThere was a problem hiding this comment.
Can be made more rigorous if you increment/decrement a refCount variable and check that it has the expected value inside the method call (0 for ref, 1 for unref.)
a903fc1 to
88734aeCompareevanlucas
commented
May 19, 2015
Tests have been updated |
bnoordhuis
commented
May 19, 2015
@evanlucas Would it be possible for you to check that the tests conform to the linting rules in #1721? That would help avoid cleanup commits. |
88734ae to
dcb4756Compareevanlucas
commented
May 19, 2015
Alright, they pass linting now. Also added the requested changes |
There was a problem hiding this comment.
Sorry, didn't notice this before: can you explicitly close the open sockets here and the next test? Calling process.exit() in tests has made bugs go unnoticed the past so I'm kind of weary of it.
bnoordhuis
commented
May 19, 2015
LGTM with a request. |
dcb4756 to
b65602fCompareRemembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572Fixes: nodejs/node-v0.x-archive#7077Fixes: nodejs/node-v0.x-archive#8572 PR-URL: #1518 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Roman Reiss <me@silverwind.io>
b65602f to
85d9983Compare
Remembers net.Socket options called before connect and retroactively
applies them after the handle has been created.
This change makes the following function calls more user-friendly:
Related: nodejs/node-v0.x-archive#7077 and
nodejs/node-v0.x-archive#8572
Repointing at master branch. See #880 for original PR