mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-10 16:12:22 +03:00
Handle GapError in updates loop
This commit is contained in:
parent
4c94407b79
commit
392808b950
|
@ -201,7 +201,11 @@ async def _update_loop(self: 'TelegramClient'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
processed = []
|
processed = []
|
||||||
users, chats = self._message_box.process_updates(updates, self._entity_cache, processed)
|
try:
|
||||||
|
users, chats = self._message_box.process_updates(updates, self._entity_cache, processed)
|
||||||
|
except GapError:
|
||||||
|
continue # get(_channel)_difference will start returning requests
|
||||||
|
|
||||||
updates_to_dispatch.extend(_preprocess_updates(self, processed, users, chats))
|
updates_to_dispatch.extend(_preprocess_updates(self, processed, users, chats))
|
||||||
except Exception:
|
except Exception:
|
||||||
self._log[__name__].exception('Fatal error handling updates (this is a bug in Telethon, please report it)')
|
self._log[__name__].exception('Fatal error handling updates (this is a bug in Telethon, please report it)')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user