From c367aa9bc98732f4ecb896ba107ebd2af9e9212d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 8 May 2017 16:01:53 +0200 Subject: [PATCH] Revert a49e50d as suggested by @cher-nov (remove __del__) __del__'s are evil because they rely on the GC --- telethon/telegram_client.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index d8889aeb..d5190edc 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -43,7 +43,7 @@ class TelegramClient: # Current TelegramClient version __version__ = '0.8' - # region Default methods of class + # region Initialization def __init__(self, session, api_id, api_hash, proxy=None): """Initializes the Telegram client with the specified API ID and Hash. @@ -82,10 +82,6 @@ class TelegramClient: # We need to be signed in before we can listen for updates self.signed_in = False - def __del__(self): - """Releases the Telegram client, performing disconnection.""" - self.disconnect() - # endregion # region Connecting