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:
Lonami Exo 2018-02-03 12:15:38 +01:00
parent 2ffe2b71dc
commit eefd37c2d7

View File

@ -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