diff --git a/devices/clients/udp_receiver.py b/devices/clients/udp_receiver.py index 8dd10f41aaf20987b398e37482bb702711bfb398..160e897b94f4ec7030f8a381f830c6879716c8c7 100644 --- a/devices/clients/udp_receiver.py +++ b/devices/clients/udp_receiver.py @@ -27,12 +27,12 @@ class UDPReceiver(Thread, StatisticsClientThread): try: self.host = self.options['udp_host'] - except Exception: + except KeyError: raise try: self.port = self.options['udp_port'] - except Exception: + except KeyError: raise self.poll_timeout = self.options['poll_timeout'] @@ -123,6 +123,3 @@ class UDPReceiver(Thread, StatisticsClientThread): 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}.") - - def __del__(self): - self.disconnect()