Skip to content

[bug fix v8.x] timers: fix a bug in error handling

This was fixed in master via a semver-major commit which can't be backported, at least not until we confirm that it doesn't cause unrelated issues.

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.

Fixes: #19970 (closed)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading