From d9bc03d1fc73248ea09eff563b21b18a41011fbb Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Mon, 20 Jul 2020 23:08:19 +0200 Subject: [PATCH] clear the multiprocessing queue to get rid of more file descriptors, refs #146 --- owrx/connection.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/owrx/connection.py b/owrx/connection.py index f3e951e..ac9c35c 100644 --- a/owrx/connection.py +++ b/owrx/connection.py @@ -37,6 +37,11 @@ class Client(ABC): self.send(data) except (EOFError, OSError): run = False + except Exception: + logger.exception("Exception on client multiprocessing queue") + + # unset the queue object to free shared memory file descriptors + self.multiprocessingPipe = None threading.Thread(target=mp_passthru).start()