From 3f2b9feb7da1fc1c2337f89467c803ebeb399a3f Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Sat, 18 Jan 2025 18:27:30 +0300 Subject: [PATCH] Cancel the status update if exception happens during await update_task --- app/library/Download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/library/Download.py b/app/library/Download.py index 8786e95d..a8d63b32 100644 --- a/app/library/Download.py +++ b/app/library/Download.py @@ -321,7 +321,8 @@ class Download: status = await self.update_task except Exception as e: LOG.error(f"Failed to get status update for: {self.info._id=}. {e}") - pass + LOG.exception(e) + return if status is None or status.__class__ is Terminator: LOG.debug(f"Closing progress update for: {self.info._id=}.")