Skip to content
Snippets Groups Projects
Commit 28cc8a7f authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-340: Let UDPReceiver baseclass handle __del__

parent 5d22a1d8
No related branches found
No related tags found
1 merge request!117create TCPReplicator for StatisticsClient
...@@ -27,12 +27,12 @@ class UDPReceiver(Thread, StatisticsClientThread): ...@@ -27,12 +27,12 @@ class UDPReceiver(Thread, StatisticsClientThread):
try: try:
self.host = self.options['udp_host'] self.host = self.options['udp_host']
except Exception: except KeyError:
raise raise
try: try:
self.port = self.options['udp_port'] self.port = self.options['udp_port']
except Exception: except KeyError:
raise raise
self.poll_timeout = self.options['poll_timeout'] self.poll_timeout = self.options['poll_timeout']
...@@ -123,6 +123,3 @@ class UDPReceiver(Thread, StatisticsClientThread): ...@@ -123,6 +123,3 @@ class UDPReceiver(Thread, StatisticsClientThread):
if self.is_alive(): if self.is_alive():
# there is nothing we can do except wait (stall) longer, which could be indefinitely. # 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}.") 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}.")
def __del__(self):
self.disconnect()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment