From a18f254384ab2ec0c2118de90d51d933c46d4d55 Mon Sep 17 00:00:00 2001 From: hikariatama Date: Mon, 8 Aug 2022 20:37:20 +0000 Subject: [PATCH] Fix `RuntimeError` in tl cache --- hikka/tl_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hikka/tl_cache.py b/hikka/tl_cache.py index 0b5d34b..f92f97a 100644 --- a/hikka/tl_cache.py +++ b/hikka/tl_cache.py @@ -253,7 +253,7 @@ def install_perms_caching(client: TelegramClient): async def cleaner(client: TelegramClient): while True: for chat, chat_data in client._hikka_perms_cache.copy().items(): - for user, user_data in chat_data.items(): + for user, user_data in chat_data.items().copy(): if user_data.expired(): del client._hikka_perms_cache[chat][user] logger.debug(f"Cleaned outdated perms cache {chat=} {user=}")