Closed Zoramite closed 1 year ago
(removing myself from review, i have 7 launches in the next 2 weeks and am not familiar with amagaki's codebase enough to provide quality guidance here.)
@Zoramite I forget how this was originally set up and used (IIRC you may have been the original author!) so I won't be able to provide too much deep thought either here but if it works for you it works for me, so LGTM.
The timer execution was adding a promise
.then
handler but not handling exceptions.This caused the error to be added to processes' unhandled exceptions even when the promise.all was also catching the error.
This change wraps the timer stopping and the triggering of the plugin hook into an async function. The
Promise.all
can correctly correlate the hooks while still getting accurate time execution.