-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(ext/node): add autoSelectFamily option to net.createConnection #26661
Conversation
04fc611
to
d3d005b
Compare
The second |
fab6c4c
to
8d80d1d
Compare
// Create a DNS server which replies with a AAAA and a A record for the same host | ||
const socket = dgram.createSocket('udp4'); | ||
|
||
// Note(kt3k): We use common.mustCallAtLeast instead of common.mustCall |
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.
nit: this should be a TODO
once both the TODOs are resolved we can remove this test from ignore in node_compat/config.jsonc
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. Thanks
once both the TODOs are resolved we can remove this test from ignore in node_compat/config.jsonc
That's correct
@@ -393,6 +408,107 @@ function _afterConnect( | |||
} | |||
} | |||
|
|||
function _createConnectionError(req, status) { |
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.
nit: I think we can just remove the underscore prefix for all the functions so they're easy to search in nodejs src too? or is something preventing us from doing that?
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 think we can just remove the underscore prefix for all the functions so they're easy to search in nodejs src too?
Sounds reasonable to me, but I would do that in another PR as there's so many of them.
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.
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.
Nice work @kt3k!
LGTM
closes #26641
tests/node_compat/test/parallel/test-net-autoselectfamily.js
) is too slow in mac (like 1m30s)tests/node_compat/test/parallel/test-net-autoselectfamily.js
) doesn't pass on windowshttp2.connect("https://example.com")
doesn't work