diff --git a/devices/clients/statistics_client.py b/devices/clients/statistics_client.py index 65f2cbb2085d7d2641c528abe21b8ac42f65ef22..5d45ac472b52ac2f024dfd4a338cb3d03f4d3c77 100644 --- a/devices/clients/statistics_client.py +++ b/devices/clients/statistics_client.py @@ -60,10 +60,10 @@ class StatisticsClient(CommClient): return super().connect() def ping(self): - if not self.statistics.isAlive(): + if not self.statistics.is_alive(): raise Exception("Statistics processing thread died unexpectedly") - if not self.udp.isAlive(): + if not self.udp.is_alive(): raise Exception("UDP thread died unexpectedly") def disconnect(self): diff --git a/devices/clients/udp_receiver.py b/devices/clients/udp_receiver.py index cca308ccea0a75d2daab14c3ded17ca0418e42a0..13f68f509ede31ac69c6fa0ab9b9d023cbda349b 100644 --- a/devices/clients/udp_receiver.py +++ b/devices/clients/udp_receiver.py @@ -81,7 +81,7 @@ class UDPReceiver(Thread): super().join(timeout) - if self.isAlive(): + if self.is_alive(): # happens if timeout is hit return @@ -89,13 +89,13 @@ class UDPReceiver(Thread): self.sock.shutdown(socket.SHUT_RDWR) def disconnect(self): - if not self.isAlive(): + if not self.is_alive(): return # try to get the thread shutdown, but don't stall forever self.join(self.DISCONNECT_TIMEOUT) - if self.isAlive(): + if self.is_alive(): # there is nothing we can do except wait (stall) longer, which could be indefinitely. logger.error(f"UDP thread for {self.host}:{self.port} did not shut down after {self.DISCONNECT_TIMEOUT} seconds, just leaving it dangling. Please attach a debugger to thread ID {self.ident}.") diff --git a/devices/devices/sdp/statistics_collector.py b/devices/devices/sdp/statistics_collector.py index 266eb451cfeffb44b7f7dbda54d192acf2a4708a..f7d01d2cb0615f157b2b6cc161cb199495d94a45 100644 --- a/devices/devices/sdp/statistics_collector.py +++ b/devices/devices/sdp/statistics_collector.py @@ -67,13 +67,13 @@ class StatisticsCollector(Thread): super().join(timeout) def disconnect(self): - if not self.isAlive(): + if not self.is_alive(): return # try to get the thread shutdown, but don't stall forever self.join(self.DISCONNECT_TIMEOUT) - if self.isAlive: + if self.is_alive(): # there is nothing we can do except wait (stall) longer, which could be indefinitely. logger.error(f"Statistics thread did not shut down after {self.DISCONNECT_TIMEOUT} seconds, just leaving it dangling. Please attach a debugger to thread ID {self.ident}.")