diff --git a/telethon/_client/updates.py b/telethon/_client/updates.py index 23d9ee27..5240e2f6 100644 --- a/telethon/_client/updates.py +++ b/telethon/_client/updates.py @@ -201,7 +201,11 @@ async def _update_loop(self: 'TelegramClient'): continue 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)) except Exception: self._log[__name__].exception('Fatal error handling updates (this is a bug in Telethon, please report it)')