diff --git a/telethon/client/updates.py b/telethon/client/updates.py index ca42dfed..6b85de7a 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -16,6 +16,8 @@ class UpdateMethods(UserMethods): try: await self.disconnected except KeyboardInterrupt: + pass + finally: await self.disconnect() def run_until_disconnected(self): @@ -33,6 +35,8 @@ class UpdateMethods(UserMethods): try: return self.loop.run_until_complete(self.disconnected) except KeyboardInterrupt: + pass + finally: self.loop.run_until_complete(self.disconnect()) def on(self, event):