mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-24 00:04:14 +03:00
Stop calling .disconnect() from .__del__()
It was causing some strange behaviour with the synchronized Queue used by the UpdateState class. Calling .get() with any timeout would block forever. Perhaps something else got released when the script ended and then any call would block forever, thus the thread never joining.
This commit is contained in:
parent
2ffe2b71dc
commit
eefd37c2d7
|
@ -255,9 +255,6 @@ class TelegramBareClient:
|
|||
self._first_request = True # On reconnect it will be first again
|
||||
self.session.close()
|
||||
|
||||
def __del__(self):
|
||||
self.disconnect()
|
||||
|
||||
def _reconnect(self, new_dc=None):
|
||||
"""If 'new_dc' is not set, only a call to .connect() will be made
|
||||
since it's assumed that the connection has been lost and the
|
||||
|
|
Loading…
Reference in New Issue
Block a user