From 0755421fc2f72e0692e740f0b2c459b6d002536d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 21 Oct 2018 16:02:13 +0200 Subject: [PATCH] Fix update loop should not disconnect causing race condition When starting the client, on phone migrations, it would disconnect twice right after connecting which would trigger a not-connected error. --- telethon/client/updates.py | 1 - 1 file changed, 1 deletion(-) diff --git a/telethon/client/updates.py b/telethon/client/updates.py index 0ae1f2f8..2511a5ca 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -218,7 +218,6 @@ class UpdateMethods(UserMethods): except asyncio.TimeoutError: pass except asyncio.CancelledError: - self.disconnect() return except Exception as e: continue # Any disconnected exception should be ignored