Title: doc(tls): tls.connect() supports timeout option but it is undocumented and misleadingly described · Issue #61075 · nodejs/node · GitHub
Open Graph Title: doc(tls): tls.connect() supports timeout option but it is undocumented and misleadingly described · Issue #61075 · nodejs/node
X Title: doc(tls): tls.connect() supports timeout option but it is undocumented and misleadingly described · Issue #61075 · nodejs/node
Description: Affected URL(s) https://nodejs.org/api/tls.html#tlsconnectoptions-callback Description of the problem tls.connect() supports the timeout option, but it is currently undocumented in the API reference. Although the history indicates that t...
Open Graph Description: Affected URL(s) https://nodejs.org/api/tls.html#tlsconnectoptions-callback Description of the problem tls.connect() supports the timeout option, but it is currently undocumented in the API referenc...
X Description: Affected URL(s) https://nodejs.org/api/tls.html#tlsconnectoptions-callback Description of the problem tls.connect() supports the timeout option, but it is currently undocumented in the API referenc...
Opengraph URL: https://github.com/nodejs/node/issues/61075
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"doc(tls): tls.connect() supports timeout option but it is undocumented and misleadingly described","articleBody":"### Affected URL(s)\n\nhttps://nodejs.org/api/tls.html#tlsconnectoptions-callback\n\n### Description of the problem\n\n`tls.connect()` supports the `timeout` option, but it is currently undocumented in the API reference.\nAlthough the history indicates that `timeout` support was added in `v11.8.0, v10.16.0`, the corresponding documentation entry was later accidentally removed. As a result, the current docs are incomplete and misleading.\n\n## Actual Behavior\n\n- `tls.connect({ timeout })` works as expected and is supported in practice\n- But it is not documented anywhere in the current API reference\n\n## Expected Behavior\n\nExplicitly document the `timeout` option in `tls.connect()` options.\n\n## Background\n\nHistorically, when timeout support was introduced to `tls.connect()`, it was properly documented.\nHowever, in a later commit, the documentation was removed unintentionally:\n\nDocumentation removal commit: https://github.com/nodejs/node/commit/ff8539e9e747db61a2adac6d4498ef4ee5826900\n\nCurrently, the `tls.connect()` options section contains the following description:\n\n\u003e …: Any `socket.connect()` option not already listed.\n\nThis wording strongly suggests that `timeout` is inherited from `socket.connect()`.\nHowever, this is *incorrect*:\n\n- timeout is not an option of `socket.connect()`\n- timeout is defined on `net.createConnection(options[, connectListener])`\n\nThis mismatch makes it very easy for users to misinterpret where timeout support comes from and whether it is officially supported.\n","author":{"url":"https://github.com/ikeyan","@type":"Person","name":"ikeyan"},"datePublished":"2025-12-15T17:25:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/61075/node/issues/61075"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8bdb288c-5322-d441-b3b7-2f68f8de02f3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 809C:265A7D:11DCD52:180373B:6A4C5864 |
| html-safe-nonce | 50cd980c03cf6da618b1fb982b2b284157d5d9bbcccb49a61662a71bfe7b9fa4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDlDOjI2NUE3RDoxMURDRDUyOjE4MDM3M0I6NkE0QzU4NjQiLCJ2aXNpdG9yX2lkIjoiNDE0NDE0MTI2NjI1NzIwNTM0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 47fbdf51736f7d3aacac7d76eb714aad197fbcffb59875852585b0e7f3abe339 |
| hovercard-subject-tag | issue:3731425617 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/61075/issue_layout |
| twitter:image | https://opengraph.githubassets.com/059e25c3317a877a2cbcb09ab4f1eb02ce55f9971ab7268b31762a2c05cb08a0/nodejs/node/issues/61075 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/059e25c3317a877a2cbcb09ab4f1eb02ce55f9971ab7268b31762a2c05cb08a0/nodejs/node/issues/61075 |
| og:image:alt | Affected URL(s) https://nodejs.org/api/tls.html#tlsconnectoptions-callback Description of the problem tls.connect() supports the timeout option, but it is currently undocumented in the API referenc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ikeyan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 14099438da5379150f15a2892474c7c7e6c0e55e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width