diff --git a/worker/transcribee_worker/document.py b/worker/transcribee_worker/document.py index b2d15a4f..a67eb9dd 100644 --- a/worker/transcribee_worker/document.py +++ b/worker/transcribee_worker/document.py @@ -50,7 +50,7 @@ async def _discard_messages(self): if self._stop.is_set(): for task in pending: task.cancel() - return + return else: pending.add(asyncio.create_task(self.conn.recv()))