From e1836863b5c248af2ce46eac2601e37b78a7971e Mon Sep 17 00:00:00 2001 From: "121189493+Nubuki-all@users.noreply.github.com" <121189493+Nubuki-all@users.noreply.github.com> Date: Sun, 5 Nov 2023 15:52:54 +0100 Subject: [PATCH] patch to prevent batch_queue leakages. --- bot/utils/batch_utils.py | 4 ++-- version.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/utils/batch_utils.py b/bot/utils/batch_utils.py index e0270cd1..63208ebb 100644 --- a/bot/utils/batch_utils.py +++ b/bot/utils/batch_utils.py @@ -140,9 +140,9 @@ async def batch_preview(event, torrent, chat_id, e_id, v, f): await asyncio.sleep(3) while True: if not BATCH_ING: + if not preview_queue: + return break - if not preview_queue: - return async with batch_lock: msg, button = await get_preview_msg( torrent.file_list, preview_queue, v, f diff --git a/version.txt b/version.txt index bafb3fe3..bc61cb96 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v2.1.0-beta.1.1 (beta) +v2.1.0-beta.1.1-0.1.patch (beta)