Fix bug when marking client as offline from server loop
..i think?
This commit is contained in:
parent
5f680ff672
commit
396b3739f3
|
@ -77,9 +77,9 @@ class TempmonServerDaemon(Daemon):
|
|||
def check_readings_for_client(self, session, client):
|
||||
delay = client.delay or 60
|
||||
cutoff = self.now - datetime.timedelta(seconds=delay + 60)
|
||||
online = False
|
||||
online = True
|
||||
for probe in client.enabled_probes():
|
||||
online = bool(self.check_readings_for_probe(session, probe, cutoff))
|
||||
online = online and bool(self.check_readings_for_probe(session, probe, cutoff))
|
||||
if not online and client.online:
|
||||
log.info("marking client as OFFLINE: {}".format(client))
|
||||
client.online = False
|
||||
|
|
Loading…
Reference in a new issue