-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
timers: fix setTimeout expiration logic
Fix the timer logic to be the same as v10.30.0. Fixes: #24203 PR-URL: #24214 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
|
||
/** | ||
* This test is for https://github.com/nodejs/node/issues/24203 | ||
*/ | ||
let count = 50; | ||
const time = 1.00000000000001; | ||
const exec = common.mustCall(() => { | ||
if (--count === 0) { | ||
return; | ||
} | ||
setTimeout(exec, time); | ||
}, count); | ||
exec(); |