fix(TimerMgr): add warning for rescheduling non-existent timers

This commit is contained in:
Christian Weimann
2025-01-10 06:05:20 +01:00
parent e299b96d15
commit 33e5781ee8

View File

@@ -66,6 +66,10 @@ class TimerMgr {
}
reschedule(id, timeout) {
if (!this.hasTimer(id)) {
log.warn(`Cannot reschedule non-existent timer with id ${id}`);
return false;
}
this.#timers[id].reschedule(timeout);
}
}