diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index 05175893..46b88887 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -270,6 +270,7 @@ class TelegramClient: return False self.session = None + return True except: # Something happened when logging out, restore the state back self.sender.logging_out = False