Skip to content

Commit f3d8639

Browse files
sam-githubaddaleax
authored andcommitted
doc: clarify timing of socket.connecting
Fixes: #25328 PR-URL: #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>
1 parent e9b4d24 commit f3d8639

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/net.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,12 @@ added: v6.1.0
666666
-->
667667

668668
If `true`,
669+
[`socket.connect(options[, connectListener])`][`socket.connect(options)`] was
670+
called and has not yet finished. It will stay `true` until the socket becomes
671+
connected, then it is set to `false` and the `'connect'` event is emitted. Note
672+
that the
669673
[`socket.connect(options[, connectListener])`][`socket.connect(options)`]
670-
was called and has not yet finished. Will be set to `true` before emitting
671-
`'connect'` event and/or calling
672-
[`socket.connect(options[, connectListener])`][`socket.connect(options)`]'s
673-
callback.
674+
callback is a listener for the `'connect'` event.
674675

675676
### socket.destroy([exception])
676677
<!-- YAML

0 commit comments

Comments
 (0)