From faf7263d8f9a8457ad9cf4b117fb330f52a654bc Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sat, 6 Jun 2020 14:04:14 +0200 Subject: [PATCH] Handle RPC errors on auto-get_difference Closes #1428. --- telethon/client/updates.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/telethon/client/updates.py b/telethon/client/updates.py index 6f93351b..70a3d9a1 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -392,6 +392,11 @@ class UpdateMethods: await self._get_difference(update, channel_id, pts_date) except OSError: pass # We were disconnected, that's okay + except errors.RPCError: + # There's a high chance the request fails because we lack + # the channel. Because these "happen sporadically" (#1428) + # we should be okay (no flood waits) even if more occur. + pass if not self._self_input_peer: # Some updates require our own ID, so we must make sure