Skip to content

Commit 288a6eb

Browse files
committed
doc: clarify socket.setKeepAlive initialDelay arg
1 parent 70b3570 commit 288a6eb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

doc/api/net.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,9 @@ data packet received and the first keepalive probe. Setting `0` for
14021402
`initialDelay` will leave the value unchanged from the default
14031403
(or previous) setting.
14041404

1405+
**Note:** Node.js converts `initialDelay` from milliseconds to seconds and truncates any fractional part.
1406+
For example, `1500` becomes `1`, and values from `1` to `999` become `0`.
1407+
14051408
Enabling the keep-alive functionality will set the following socket options:
14061409

14071410
* `SO_KEEPALIVE=1`

0 commit comments

Comments
 (0)