Skip to content

Commit f84317f

Browse files
sam-githubBethGriggs
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 41e16c1 commit f84317f

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
@@ -659,11 +659,12 @@ added: v6.1.0
659659
-->
660660

661661
If `true`,
662+
[`socket.connect(options[, connectListener])`][`socket.connect(options)`] was
663+
called and has not yet finished. It will stay `true` until the socket becomes
664+
connected, then it is set to `false` and the `'connect'` event is emitted. Note
665+
that the
662666
[`socket.connect(options[, connectListener])`][`socket.connect(options)`]
663-
was called and has not yet finished. Will be set to `true` before emitting
664-
`'connect'` event and/or calling
665-
[`socket.connect(options[, connectListener])`][`socket.connect(options)`]'s
666-
callback.
667+
callback is a listener for the `'connect'` event.
667668

668669
### socket.destroy([exception])
669670
<!-- YAML

0 commit comments

Comments
 (0)