fix(timers): prevent duplicate timer creation

This commit is contained in:
Christian Weimann
2025-01-10 06:00:17 +01:00
parent 4114f0a4a4
commit 7852cda9e6

View File

@@ -10,6 +10,10 @@ class TimerMgr {
}
create(id, timeout, func) {
if (this.hasTimer(id)) {
log.error(`Timer with id ${id} already exists`);
return;
}
log.debug("Create timer with id " + id);
this.#timers[id] = actions.ScriptExecution.createTimer(id, timeout, func);
}