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

net.autoSelectFamilyAttemptTimeoutDefault should not be constant #52082

Open
callmebar opened this issue Mar 14, 2024 · 3 comments
Open

net.autoSelectFamilyAttemptTimeoutDefault should not be constant #52082

callmebar opened this issue Mar 14, 2024 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js. net Issues and PRs related to the net subsystem.

Comments

@callmebar
Copy link

What is the problem this feature will solve?

I have slow Internet connection and when a domain with multiple ip appears, I always get ETIMEDOUT because the connection can not be established in default autoSelectFamilyAttemptTimeoutDefault=250ms. There are a lot of npm packages that use node:net, and it'not possible to wait until all of them implement a mechanism to deal with autoSelectFamilyAttemptTimeout.

What is the feature you are proposing to solve the problem?

I believe it should be fixed by setting autoSelectFamilyAttemptTimeoutDefault in NODE_OPTIONS

What alternatives have you considered?

Now, it's possible to change this parameter by calling net.setDefaultAutoSelectFamilyAttemptTimeout, but I can call it only in my own code, but not from other applications (e.g. yarn), so it won't help in most cases.
Alternatively, you can just increase the default parameter, but it is not flexible solution.

@callmebar callmebar added the feature request Issues that request new features to be added to Node.js. label Mar 14, 2024
@marco-ippolito marco-ippolito added the net Issues and PRs related to the net subsystem. label Mar 15, 2024
@marco-ippolito
Copy link
Member

cc @ShogunPanda

@ShogunPanda
Copy link
Contributor

I'm totally in for this. Would you like to send a PR? Otherwise I'll try to implement shortly.

@jazelly
Copy link
Member

jazelly commented Aug 25, 2024

This has probably been fixed by #52474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. net Issues and PRs related to the net subsystem.
Projects
Status: Awaiting Triage
Development

No branches or pull requests

4 participants