Handle connection error when fetching difference in updates

This commit is contained in:
Lonami Exo 2019-07-23 21:12:08 +02:00
parent 5a225d1668
commit de85c34462

View File

@ -378,7 +378,10 @@ class UpdateMethods:
if self._state_cache.update(update, check_only=True):
# If the update doesn't have pts, fetching won't do anything.
# For example, UpdateUserStatus or UpdateChatUserTyping.
await self._get_difference(update, channel_id, pts_date)
try:
await self._get_difference(update, channel_id, pts_date)
except OSError:
pass # We were disconnected, that's okay
built = EventBuilderDict(self, update, others)
for conv_set in self._conversations.values():