mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Shield self.disconnected and log RpcCallFail
This commit is contained in:
@@ -177,7 +177,11 @@ class UpdateMethods(UserMethods):
|
||||
rnd = lambda: random.randrange(-2**63, 2**63)
|
||||
while self.is_connected():
|
||||
try:
|
||||
await asyncio.wait_for(self.disconnected, timeout=60)
|
||||
await asyncio.wait_for(
|
||||
asyncio.shield(self.disconnected, loop=self._loop),
|
||||
timeout=60,
|
||||
loop=self._loop
|
||||
)
|
||||
continue # We actually just want to act upon timeout
|
||||
except asyncio.TimeoutError:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user