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

Commit 8bb66cd

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>
1 parent acebfed commit 8bb66cd

2 files changed

Lines changed: 63 additions & 2 deletions

File tree

lib/timers.js

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

0 commit comments

Comments
 (0)