Execute get_me() on reconnect

This should let Telegram know we still want updates.
Ideally, we would catch up, but that requires more work.
This commit is contained in:
Lonami Exo 2020-01-04 17:22:53 +01:00
parent 0683d9771a
commit 364afd61e1

View File

@ -502,6 +502,14 @@ class UpdateMethods:
async def _handle_auto_reconnect(self: 'TelegramClient'):
# TODO Catch-up
# For now we make a high-level request to let Telegram
# know we are still interested in receiving more updates.
try:
await self.get_me()
except Exception as e:
self._log[__name__].warning('Error executing high-level request '
'after reconnect: %s: %s', type(e), e)
return
try:
self._log[__name__].info(