Skip to content

doc: correct Http2SecureServer.setTimeout() default - #65175

Open
arhxam wants to merge 1 commit into
nodejs:mainfrom
arhxam:doc-http2-secure-settimeout
Open

doc: correct Http2SecureServer.setTimeout() default#65175
arhxam wants to merge 1 commit into
nodejs:mainfrom
arhxam:doc-http2-secure-settimeout

Conversation

@arhxam

@arhxam arhxam commented Aug 9, 2026

Copy link
Copy Markdown

Description

The documented default for the msecs argument of
Http2SecureServer.setTimeout() was 120000 (2 minutes), but the
actual default timeout is 0 (no timeout).

Evidence:

  • The constructor sets this.timeout = 0 in
    lib/internal/http2/core.js for both Http2Server and
    Http2SecureServer.

  • At runtime:

    const http2 = require('node:http2');
    console.log(http2.createSecureServer().timeout); // 0
  • The equivalent Http2Server.setTimeout() documentation already
    states Default: 0 (no timeout) and carries a v13.0.0
    changelog entry noting the default changed from 120s to 0 (in
    http, http2: remove default server timeout #27558). The
    Http2SecureServer.setTimeout() entry was missed in that update.

This corrects the default to 0 (no timeout) and adds the matching
v13.0.0 changelog entry so both server variants are consistent.
Documentation-only change.

The documented default for the `msecs` argument of
`Http2SecureServer.setTimeout()` was `120000` (2 minutes), but the
actual default timeout is `0` (no timeout): the constructor sets
`this.timeout = 0` in lib/internal/http2/core.js, and the equivalent
`Http2Server.setTimeout()` documentation already states
`0 (no timeout)`.

The default changed from 120s to 0 in
nodejs#27558, but this line was missed when
the sibling entries were updated. Correct the default and add the
matching changelog entry.

Signed-off-by: Arham Wani <arhamwani765@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/http2
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. http2 Issues or PRs related to the http2 subsystem. labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. http2 Issues or PRs related to the http2 subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants