timers: use consistent checks for canceled timers · nodejs/node@553d95d · GitHub
Skip to content

Commit 553d95d

Browse files
Fishrock123MylesBorins
authored andcommitted
timers: use consistent checks for canceled timers
Previously not all codepaths set `timer._idleTimeout = -1` for canceled or closed timers, and not all codepaths checked it either. Unenroll uses this to say that a timer is indeed closed and it is the closest thing there is to an authoritative source for this. Refs: #9606 Fixes: #9561 PR-URL: #9685 Reviewed-By: Rich Trott <rtrott@gmail.com> Conflicts: lib/timers.js
1 parent ae2eff2 commit 553d95d

2 files changed

Lines changed: 63 additions & 5 deletions

File tree

lib/timers.js

Lines changed: 14 additions & 5 deletions
Lines changed: 49 additions & 0 deletions

0 commit comments

Comments
 (0)