Chang auto-reconnect condition (fix #303)

This commit is contained in:
Lonami Exo 2017-10-08 10:52:56 +02:00
parent 244a47cddd
commit 62aec947c0

View File

@ -482,8 +482,8 @@ class TelegramBareClient:
pass # We will just retry pass # We will just retry
except ConnectionResetError: except ConnectionResetError:
if not self._authorized or self._reconnect_lock.locked(): if not self._user_connected or self._reconnect_lock.locked():
# Only attempt reconnecting if we're authorized and not # Only attempt reconnecting if the user called connect and not
# reconnecting already. # reconnecting already.
raise raise