fix(TimerMgr): add warning for rescheduling non-existent timers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user