From 037e37a760384dc446c67c48aa8127fd43fb8371 Mon Sep 17 00:00:00 2001 From: acgnhik Date: Sat, 25 Feb 2023 13:17:27 +0800 Subject: [PATCH] fix: fix remove all tasks failed --- src/blrec/task/task_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blrec/task/task_manager.py b/src/blrec/task/task_manager.py index 5c5e3b0..23bfecf 100644 --- a/src/blrec/task/task_manager.py +++ b/src/blrec/task/task_manager.py @@ -125,7 +125,7 @@ class RecordTaskManager: async def remove_all_tasks(self) -> None: logger.debug('Removing all tasks...') - for room_id, task in self._tasks.items(): + for room_id, task in self._tasks.copy().items(): if not task.ready: continue await self.remove_task(room_id)