-
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: pending socket re-use #30832
Comments
I think those things would ideally need to be fixed, however this is a really obscure feature of Node.js, and I suspect most do not even know that is there or why it's needed. If the fix are trivial, go for them. If they are complex, then it's probably not worth it. |
I'll look into it when porting it over to
Would it be an option to hard deprecate re-use and error when trying to do so? |
Possibly, I'm not sure if there are some usage in the wild. |
I find |
It looks like
net.Socket
instances are intended to be re-used however while reading through the code I spot some potential problems:_destroy()
: doesn't wait for connect to finishconnect
: doesn't first destroy if already connected, before connecting againconnect
: doesn't wait for pending destroy to finish, before calling e.g._undestroy()
Not sure if these are actual problems that need to be fixed?
@mcollina
The text was updated successfully, but these errors were encountered: