doc: clarify timing of socket.connecting

Fixes: https://github.com/nodejs/node/issues/25328

PR-URL: https://github.com/nodejs/node/pull/25333
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Sam Roberts 2019-01-03 16:09:24 -08:00
parent 9b7226d66c
commit ccc06a3c32

View File

@ -666,11 +666,12 @@ added: v6.1.0
--> -->
If `true`, If `true`,
[`socket.connect(options[, connectListener])`][`socket.connect(options)`] was
called and has not yet finished. It will stay `true` until the socket becomes
connected, then it is set to `false` and the `'connect'` event is emitted. Note
that the
[`socket.connect(options[, connectListener])`][`socket.connect(options)`] [`socket.connect(options[, connectListener])`][`socket.connect(options)`]
was called and has not yet finished. Will be set to `true` before emitting callback is a listener for the `'connect'` event.
`'connect'` event and/or calling
[`socket.connect(options[, connectListener])`][`socket.connect(options)`]'s
callback.
### socket.destroy([exception]) ### socket.destroy([exception])
<!-- YAML <!-- YAML