This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
net: use cached peername to resolve remote props #9366
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -53,12 +57,20 @@ server.listen(common.PORT, 'localhost', function() { | |||
assert.equal(common.PORT, client.remotePort); | |||
client.end(); | |||
}); | |||
client.on('close', function() { | |||
assert.notEqual(-1, remoteAddrCandidates.indexOf(client2.remoteAddress)); |
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.
Should these two lines be checking client
instead of client2
?
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.
Good catch. Woops!
One question about the test. I haven't run the code, but if the CI is happy, then this LGTM. |
jameshartig
force-pushed
the
remoteAddress
branch
from
March 10, 2015 20:48
0e19933
to
8edf9ed
Compare
Allows socket.remote* properties to still be accessed even after the socket is closed. Fixes nodejs#9287
Good catch. Fixed the test and it still passes. |
Thanks! Landed in 8c38b07. |
cjihrig
pushed a commit
to nodejs/node
that referenced
this pull request
Mar 16, 2015
Allows socket.remote* properties to still be accessed even after the socket is closed. Fixes: nodejs/node-v0.x-archive#9287 PR-URL: nodejs/node-v0.x-archive#9366 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@cjihrig ... do you happen to know why this was reopened? |
I think that was a malfunction in the TJ Fontaine bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows socket.remote* properties to still be accessed even after the
socket is closed. Fixes #9287