Fix: set working state properly
This commit is contained in:
parent
b03759b64c
commit
6bd6049c02
|
@ -63,18 +63,18 @@ async function updateDevicesInfo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
working = false
|
|
||||||
}, DEBOUNCE_TIME_MS)
|
|
||||||
|
|
||||||
pubsub.publish(USER_PRESENCE_UPDATED, {
|
pubsub.publish(USER_PRESENCE_UPDATED, {
|
||||||
userPresenceUpdated: onlineDevices.length
|
userPresenceUpdated: onlineDevices.length
|
||||||
})
|
})
|
||||||
|
|
||||||
return onlineDevices.length
|
return onlineDevices.length
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Error updating DB: ', e)
|
console.log('Error updating Wi-Fi devices: ', e)
|
||||||
return 0
|
return 0
|
||||||
|
} finally {
|
||||||
|
setTimeout(() => {
|
||||||
|
working = false
|
||||||
|
}, DEBOUNCE_TIME_MS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user