Skip to content
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 #12: Force the server and client of Node.js Com to use IPv4. #13

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Nov 2, 2021

Node.js 17 switched from resolving host names to IPv4 by default to resolving to the order given by the OS. This was an intended change done in nodejs/node#39987, which nevertheless caused issues in downstream projects, as reported in nodejs/node#40537.

scalajs-env-nodejs hit that issue, as the JVM server opened on IPv4 by default (apparently this is what the JVM does), but the client tried to connect via IPv6 with Node.js 17. We fix the issue by forcing the use of IPv4 in the Node.js client, as well as on the JVM server for good measure.

Node.js 17 switched from resolving host names to IPv4 by default to
resolving to the order given by the OS. This was an intended change
done in nodejs/node#39987, which
nevertheless caused issues in downstream projects, as reported in
nodejs/node#40537.

scalajs-env-nodejs hit that issue, as the JVM server opened on IPv4
by default (apparently this is what the JVM does), but the client
tried to connect via IPv6 with Node.js 17. We fix the issue by
forcing the use of IPv4 in the Node.js client, as well as on the
JVM server for good measure.
@sjrd sjrd changed the title Temp: add Node.js 17 to the matrix to make it fail Fix #12: Force the server and client of Node.js Com to use IPv4. Nov 2, 2021
@sjrd sjrd marked this pull request as ready for review November 2, 2021 16:30
@sjrd sjrd requested a review from gzm0 November 2, 2021 16:30
Copy link
Contributor

@gzm0 gzm0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v4 will never die :P

@sjrd sjrd merged commit 625e290 into scala-js:master Nov 2, 2021
@sjrd sjrd deleted the fix-node-js-17 branch November 2, 2021 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants