timers: fix cleanup of nested same-timeout timers · nodejs/node@381aef8 · GitHub
Skip to content

Commit 381aef8

Browse files
erinishimotichacjihrig
authored andcommitted
timers: fix cleanup of nested same-timeout timers
For nested timers with the same timeout, we can get into a situation where we have recreated a timer list immediately before we need to clean up an old timer list with the same key. Fix: make sure the list to be deleted is the same instance as the list whose reference was used to determine that a cleanup is necessary. If it's not the same instance, a new list with the same key has been created, and it should not be deleted. Fixes: #7722 PR-URL: #7827 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
1 parent 8d8d70d commit 381aef8

2 files changed

Lines changed: 86 additions & 2 deletions

File tree

lib/timers.js

Lines changed: 6 additions & 2 deletions
Lines changed: 80 additions & 0 deletions

0 commit comments

Comments
 (0)