mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-18 19:16:43 +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:
parent
0683d9771a
commit
364afd61e1
@ -502,6 +502,14 @@ class UpdateMethods:
|
|||||||
|
|
||||||
async def _handle_auto_reconnect(self: 'TelegramClient'):
|
async def _handle_auto_reconnect(self: 'TelegramClient'):
|
||||||
# TODO Catch-up
|
# 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
|
return
|
||||||
try:
|
try:
|
||||||
self._log[__name__].info(
|
self._log[__name__].info(
|
||||||
|
Loading…
Reference in New Issue
Block a user