mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-20 13:31:00 +03:00
parent
becfe2ce7a
commit
ee0fc5cc29
|
@ -404,7 +404,9 @@ class MTProtoSender:
|
||||||
|
|
||||||
if not ok:
|
if not ok:
|
||||||
self._log.error('Automatic reconnection failed %d time(s)', attempt)
|
self._log.error('Automatic reconnection failed %d time(s)', attempt)
|
||||||
await self._disconnect(error=last_error.with_traceback(None))
|
# There may be no error (e.g. automatic reconnection was turned off).
|
||||||
|
error = last_error.with_traceback(None) if last_error else None
|
||||||
|
await self._disconnect(error=error)
|
||||||
|
|
||||||
def _start_reconnect(self, error):
|
def _start_reconnect(self, error):
|
||||||
"""Starts a reconnection in the background."""
|
"""Starts a reconnection in the background."""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user