Skip to content

Commit eb2eadc

Browse files
doc: apply suggestion
Co-authored-by: Ethan Arrowood <ethan@arrowood.dev>
1 parent e0814bc commit eb2eadc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

doc/api/net.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,8 @@ data packet received and the first keepalive probe. Setting `0` for
14041404

14051405
**Note**: Node.js converts initialDelay from milliseconds to seconds and truncates any fractional part.
14061406
For example, `setKeepAlive(true, 500)` does not update the delay because it is truncated to `0`, leaving the value
1407-
unchanged, while `setKeepAlive(true, 1500)` sets it to `1` second.
1407+
For example, `setKeepAlive(true, 500)` does not update the delay because it is first converted to `0.5` and then truncated to `0`, leaving the value
1408+
unchanged, while `setKeepAlive(true, 1500)` sets it to `1` second (converted to `1.5`, then truncated to `1`).
14081409

14091410
Enabling the keep-alive functionality will set the following socket options:
14101411

0 commit comments

Comments
 (0)