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: socket options ignored before connect #8572
Labels
Milestone
Comments
mscdex
changed the title
net: cannot set socket options before connect
net: socket options ignored before connect
Oct 17, 2014
related: #7077 |
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
Referencing #21079 which describes the same issue and has some very useful information too. |
nodejs/node#1518 seems to be moving towards the right direction, we might be able to backport it soon. |
Adding to the 0.13.1 milestone as I would expect it could break v0.10.x and v0.12.x users, but I'm open to other opinions. |
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 <info@bnoordhuis.nl> Reviewed-By: Roman Reiss <me@silverwind.io>
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 <info@bnoordhuis.nl> Reviewed-By: Roman Reiss <me@silverwind.io>
This isn't really a "critical bug", so it isn't applicable for a v0.10 backport. Does anyone have strong feelings for backporting to v0.12? It has been a while. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently if you try setting socket options (e.g. via
socket.setKeepAlive()
) on a new TCP socket before callingsocket.connect()
, the arguments are silently ignored.To avoid confusion about this I suggest two separate solutions:
The text was updated successfully, but these errors were encountered: