mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
doc: add warning for socket.connect reuse
PR-URL: https://github.com/nodejs/node/pull/33204 Refs: https://github.com/nodejs/node/issues/25969 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
bcdbd57134
commit
e50ae7a259
1 file changed
+4
@@ -600,6 +600,10 @@ the error passed to the [`'error'`][] listener.
|
||||
The last parameter `connectListener`, if supplied, will be added as a listener
|
||||
for the [`'connect'`][] event **once**.
|
||||
|
||||
This function should only be used for reconnecting a socket after
|
||||
`'close'` has been emitted or otherwise it may lead to undefined
|
||||
behavior.
|
||||
|
||||
#### `socket.connect(options[, connectListener])`
|
||||
<!-- YAML
|
||||
added: v0.1.90
|
||||
|
||||
Reference in new issue
Block a user