-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
doc: document timeout option for tls.connect() #61079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
9d8df44 to
3b73269
Compare
3b73269 to
6c306b6
Compare
78da2b7 to
fb40d84
Compare
fb40d84 to
6bd585e
Compare
|
@azadgupta1 The |
| * `timeout` {number} Sets the socket to timeout after `timeout` milliseconds | ||
| of inactivity. By default, no timeout is set. This option is supported | ||
| because `tls.connect()` internally uses [`net.createConnection()`][] | ||
| and is equivalent to calling [`socket.setTimeout()`][] on the returned socket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original description (ff8539e) is more concise and accurate, can you please restore it?
| @@ -1740,7 +1744,7 @@ changes: | |||
| `onread` option of [`net.Socket`][] for details. | |||
| * ...: [`tls.createSecureContext()`][] options that are used if the | |||
| `secureContext` option is missing, otherwise they are ignored. | |||
| * ...: Any [`socket.connect()`][] option not already listed. | |||
| * ...: Any [`net.createConnection()`][] option not already listed. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be reverted.
Fixes #61075
This PR documents the
timeoutoption supported bytls.connect()sincev11.8.0 / v10.16.0 and fixes misleading wording suggesting it comes from
socket.connect(). The option is inherited fromnet.createConnection()and is equivalent to calling
socket.setTimeout().