From 396b3739f391d478afb7972ac75defe45713172d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 1 Jun 2017 17:37:27 -0500 Subject: [PATCH] Fix bug when marking client as offline from server loop ..i think? --- rattail_tempmon/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rattail_tempmon/server.py b/rattail_tempmon/server.py index 66b70db..cc9513c 100644 --- a/rattail_tempmon/server.py +++ b/rattail_tempmon/server.py @@ -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