Commit Detail
Commit ad66272
fix: properly cleanup setTimeout when `scheduler.wait` gets aborted Even though `scheduler.wait` can be passed an `AbortSignal`, when this signal is actioned it doesn't seem to properly cleanup the setTimeout. This is most troubling when the aborted `scheduler.wait` has to wait for a good while, because that `setTimeout` slot will probably never be freed up. The repro test emulates 11k setTimeouts being aborted - and before that would fail with: ``` workerd/io/worker.c++:2324: info: uncaught exception; source = Uncaught (in promise); stack = QuotaExceededError: You have exceeded the number of active timeouts you may set. max active timeouts: 10000, current active timeouts: 10000, finished timeouts: 0 ``` And now it passes because it correctly cancels the setTimeout.
Files changed
2 files changed~2 modified