mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user