Unverified Commit a52f15ef authored by Anatoli Papirovski's avatar Anatoli Papirovski Committed by Myles Borins
Browse files

timers: fix a bug in error handling

When a timeout within a list of timeouts (that consists of only
that specific timeout) throws during its execution, it's possible
for the TimerWrap handle to become shared between both that list
and an unref'd timeout created in the future. This fixes the bug
by extending error handling in timeout execution to check for
whether the current list is empty and if so do cleanup on it.

PR-URL: https://github.com/nodejs/node/pull/20497
Fixes: https://github.com/nodejs/node/issues/19970


Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarShingo Inoue <leko.noor@gmail.com>
parent 1455b1de
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment