This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
net: unref() is not persistent #7077
Labels
Milestone
Comments
Right this is definitely a bug that should be squashed. Assigned to me. |
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
Feb 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
Feb 20, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
Feb 20, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
Feb 23, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
Mar 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
Mar 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
Apr 24, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
May 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
May 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
May 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
May 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to evanlucas/node
that referenced
this issue
May 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572
evanlucas
added a commit
to nodejs/node
that referenced
this issue
May 19, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572 Fixes: nodejs/node-v0.x-archive#7077 Fixes: nodejs/node-v0.x-archive#8572 PR-URL: #1518 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
nodejs/node@85d9983 just landed. It can either be ported, or we can close this and pick up the changes in the converged branch. |
andrewdeandrade
pushed a commit
to andrewdeandrade/node
that referenced
this issue
Jun 3, 2015
Remembers net.Socket options called before connect and retroactively applies them after the handle has been created. This change makes the following function calls more user-friendly: - setKeepAlive() - setNoDelay() - ref() - unref() Related: nodejs/node-v0.x-archive#7077 and nodejs/node-v0.x-archive#8572 Fixes: nodejs/node-v0.x-archive#7077 Fixes: nodejs/node-v0.x-archive#8572 PR-URL: nodejs/node#1518 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It hangs because of the unref() that comes before listen() and the one after connect(). In that vein:
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.
The text was updated successfully, but these errors were encountered: