From ce3cf0dffdc83069298632ed03fc1f2761074b35 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Thu, 3 Jan 2019 16:09:24 -0800 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Beth Griggs Reviewed-By: Anna Henningsen --- doc/api/net.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/api/net.md b/doc/api/net.md index dceecf9b3964d3..5769807bfb3655 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -659,11 +659,12 @@ added: v6.1.0 --> 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)`] -was called and has not yet finished. Will be set to `true` before emitting -`'connect'` event and/or calling -[`socket.connect(options[, connectListener])`][`socket.connect(options)`]'s -callback. +callback is a listener for the `'connect'` event. ### socket.destroy([exception])