You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
It hangs because of the unref() that comes before listen() and the one after connect(). In that vein:
require('net').connect(42).unref();
It fails with ECONNREFUSED because the unref() is a no-op. The expected behavior for both scripts is that they simply quit. Affects v0.10 and master.
The documentation doesn't mention when it's okay to call unref(). For the sake of user friendliness, net.Socket and net.Server should remember the ref state and retroactively apply it when the handle is created. Probably applies to other handle types as well.