fix: fix remove all tasks failed

This commit is contained in:
acgnhik 2023-02-25 13:17:27 +08:00
parent c042c737ce
commit 037e37a760

View File

@ -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)