From 288a6ebcadea5b41ef9bc3868b3959a6055f480f Mon Sep 17 00:00:00 2001 From: Efe Karasakal Date: Mon, 9 Mar 2026 18:23:41 +0100 Subject: [PATCH] doc: clarify socket.setKeepAlive initialDelay arg --- doc/api/net.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/net.md b/doc/api/net.md index f8cd3ccf8d3c40..c6321c3b38c7a7 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -1402,6 +1402,9 @@ data packet received and the first keepalive probe. Setting `0` for `initialDelay` will leave the value unchanged from the default (or previous) setting. +**Note:** Node.js converts `initialDelay` from milliseconds to seconds and truncates any fractional part. +For example, `1500` becomes `1`, and values from `1` to `999` become `0`. + Enabling the keep-alive functionality will set the following socket options: * `SO_KEEPALIVE=1`