diff --git a/telethon/client/auth.py b/telethon/client/auth.py index 36afc343..b6add62c 100644 --- a/telethon/client/auth.py +++ b/telethon/client/auth.py @@ -550,7 +550,8 @@ class AuthMethods(MessageParseMethods, UserMethods): return await self.start() def __exit__(self, *args): - self.disconnect() # It's also syncified, like start() + # No loop.run_until_complete; it's already syncified + self.disconnect() async def __aexit__(self, *args): await self.disconnect() diff --git a/telethon/client/updates.py b/telethon/client/updates.py index 6b85de7a..2c409735 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -37,7 +37,8 @@ class UpdateMethods(UserMethods): except KeyboardInterrupt: pass finally: - self.loop.run_until_complete(self.disconnect()) + # No loop.run_until_complete; it's already syncified + self.disconnect() def on(self, event): """