From d41064ba05faf6167c0d26db2ab525d0bb410bf8 Mon Sep 17 00:00:00 2001 From: Hemna Date: Thu, 24 Apr 2025 20:44:07 -0400 Subject: [PATCH] Don't log an IOError on shutdown This updates the consumer loop to only log an IOError if we are not in the process of shutting down. --- aprsd/client/drivers/lib/aprslib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aprsd/client/drivers/lib/aprslib.py b/aprsd/client/drivers/lib/aprslib.py index 4ed3504..d72994d 100644 --- a/aprsd/client/drivers/lib/aprslib.py +++ b/aprsd/client/drivers/lib/aprslib.py @@ -242,7 +242,7 @@ class APRSLibClient(aprslib.IS): line = b'' - while True and not self.thread_stop: + while not self.thread_stop: try: for line in self._socket_readlines(blocking): if line[0:1] != b'#': @@ -285,7 +285,8 @@ class APRSLibClient(aprslib.IS): except StopIteration: break except IOError: - self.logger.error('IOError') + if not self.thread_stop: + self.logger.error('IOError') break except Exception: self.logger.error('APRS Packet: %s', line)