-
Notifications
You must be signed in to change notification settings - Fork 30k
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
net: remoteAddress always undefined called before connected #43011
Conversation
Review requested:
|
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!
Can you link that PR so I can take a look tomorrow? |
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
can this be merged? |
At least two approvals and 48 hours passed. I think we're good to go! |
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
Landed in b88045f |
PR-URL: #43011 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #43011 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This seems to in break v16.x: make[1]: Leaving directory '/home/juanarbol/GitHub/node/test/node-api/test_worker_terminate/build'
/usr/bin/python3.10 tools/test.py --mode=release \
\
--skip-tests= \
default \
addons js-native-api node-api
=== release test-net-remote-address-port ===
Path: parallel/test-net-remote-address-port
node:assert:399
throw err;
^
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert.ok(remoteFamilyCandidates.includes(socket.remoteFamily))
at Server.<anonymous> (/home/juanarbol/GitHub/node/test/parallel/test-net-remote-address-port.js:38:10)
at Server.<anonymous> (/home/juanarbol/GitHub/node/test/common/index.js:417:15)
at Server.emit (node:events:527:28)
at TCP.onconnection (node:net:1634:8) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
} not really sure why, I will label this one as backport-requested in the meantime |
fix #43009
connecting
and get remote address, family and port, returnthis._peername || {}
directly.remoteFamily
isIPvundefined
when it doesn't exis, returnundefined
if it does not exist.