Commit a7c66b6a authored by Jeremiah Senkpiel's avatar Jeremiah Senkpiel
Browse files

timers: truncate decimal values

Reverts some timers behavior back to as it was before
2930bd13

That commit introduced an unintended change which allowed non-integer
timeouts to actually exist since the value is no longer converted to an
integer via a TimeWrap handle directly.

Even with the fix in
e9de4354
non-integer timeouts are still indeterministic, because libuv does not
support them.

This fixes the issue by emulating the old behavior:
truncate the `_idleTimeout` before using it.

See comments in
https://github.com/nodejs/node/pull/24214
for more background on this.

PR-URL: https://github.com/nodejs/node/pull/24819


Reviewed-By: default avatarAnatoli Papirovski <apapirovski@mac.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent a0419dd8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment