From 62aec947c02803ae020bdb5db6caf677647fcfc2 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 8 Oct 2017 10:52:56 +0200 Subject: [PATCH] Chang auto-reconnect condition (fix #303) --- telethon/telegram_bare_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/telegram_bare_client.py b/telethon/telegram_bare_client.py index b8d1b071..47d1e2ae 100644 --- a/telethon/telegram_bare_client.py +++ b/telethon/telegram_bare_client.py @@ -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