Fixed possible invalid comparison in link watchdog job

pull/360/head
Mark Qvist 2023-08-05 15:10:00 +02:00
rodzic ae28f04ce4
commit 08bfd923ea
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -510,7 +510,11 @@ class Link:
def __watchdog_job(self):
while not self.status == Link.CLOSED:
while (self.watchdog_lock):
sleep(max(self.rtt, 0.025))
rtt_wait = 0.025
if hasattr(self, "rtt") and self.rtt:
rtt_wait = self.rtt
sleep(max(rtt_wait, 0.025))
if not self.status == Link.CLOSED:
# Link was initiated, but no response