mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-23 01:46:35 +03:00
Chang auto-reconnect condition (fix #303)
This commit is contained in:
parent
244a47cddd
commit
62aec947c0
|
@ -482,8 +482,8 @@ class TelegramBareClient:
|
|||
pass # We will just retry
|
||||
|
||||
except ConnectionResetError:
|
||||
if not self._authorized or self._reconnect_lock.locked():
|
||||
# Only attempt reconnecting if we're authorized and not
|
||||
if not self._user_connected or self._reconnect_lock.locked():
|
||||
# Only attempt reconnecting if the user called connect and not
|
||||
# reconnecting already.
|
||||
raise
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user