diff --git a/doc/api/net.md b/doc/api/net.md index ab569a7b9c6f..30f139e757e3 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -1669,7 +1669,11 @@ corresponding system default unchanged. `initialDelay` and `interval` are specified in milliseconds but the underlying socket options are configured in whole seconds; the values are -divided by `1000` and rounded down before being applied. +divided by `1000` and rounded down before being applied. Sub-second timings +cannot be expressed, so a positive value below `1000` throws +[`ERR_OUT_OF_RANGE`][] rather than leaving the corresponding system default in +place. The largest delay the socket options can carry is `32767` seconds, and a +value above that throws as well. Enabling the keep-alive functionality will set the following socket options: @@ -1688,6 +1692,12 @@ those platforms. added: - v26.4.0 - v24.19.0 +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/65528 + description: A positive `initialDelay` or `interval` that cannot be applied + as requested now throws `ERR_OUT_OF_RANGE` instead of being + silently altered. --> * `options` {Object} @@ -1709,6 +1719,11 @@ socket.setKeepAlive({ enable: true, initialDelay: 1000, interval: 1000, count: 1