timers: fix refresh inside callback · nodejs/node@3ec652a · GitHub
Skip to content

Commit 3ec652a

Browse files
apapirovskitargos
authored andcommitted
timers: fix refresh inside callback
When `timers.refresh()` is called inside a callback, the timer would incorrectly end up unrefed and thus not keep the event loop alive. PR-URL: #26721 Fixes: #26642 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 899de0a commit 3ec652a

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

lib/internal/timers.js

Lines changed: 1 addition & 1 deletion
Lines changed: 14 additions & 0 deletions

0 commit comments

Comments
 (0)