This commit is contained in:
Koen Kanters 2019-04-09 19:17:16 +02:00
parent 78ff9b1937
commit 811692fed8

View File

@ -90,13 +90,13 @@ class DeviceAvailability {
}, mechanism);
}
setTimer(ieeeAddr) {
if (this.timers[ieeeAddr]) {
clearTimeout(this.timers[ieeeAddr]);
setTimer(device) {
if (this.timers[device.ieeeAddr]) {
clearTimeout(this.timers[device.ieeeAddr]);
}
this.timers[ieeeAddr] = setTimeout(() => {
this.handleInterval(ieeeAddr);
this.timers[device.ieeeAddr] = setTimeout(() => {
this.handleInterval(device);
}, utils.secondsToMilliseconds(this.availability_timeout));
}