From 6d97c00f7e93b80c49ecfa7c43c5e2f2020e652d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 3 Nov 2022 21:49:52 +0000 Subject: [PATCH] daemon: Catch any timeout errors in the log streamer Signed-off-by: Michael Tremer --- src/pakfire/daemon.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pakfire/daemon.py b/src/pakfire/daemon.py index 166f28e78..202ee84d6 100644 --- a/src/pakfire/daemon.py +++ b/src/pakfire/daemon.py @@ -381,7 +381,15 @@ class BuildLogger(object): while True: # Fetch a message from the queue - message = await asyncio.wait_for(self.queue.get(), timeout=timeout) + try: + message = await asyncio.wait_for(self.queue.get(), timeout=timeout) + + # If we did not receive any messages within the timeout, + # we return control back to the caller + except asyncio.TimeoutError as e: + break + + # Ignore any empty messages if message is None: continue -- 2.47.3