mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 12:10:21 +03:00
Fixed multiple start() of same UpdatesThread.
This commit is contained in:
parent
876ec218f8
commit
9fe7a53303
|
@ -133,14 +133,14 @@ class TelegramClient(TelegramBareClient):
|
|||
|
||||
*args will be ignored.
|
||||
"""
|
||||
conn_return = super().connect()
|
||||
result = super().connect()
|
||||
|
||||
# Checking if there are update_handlers and if true, start runngin updates thread.
|
||||
# Checking if there are update_handlers and if true, start running updates thread.
|
||||
# This situation may occur on reconnecting.
|
||||
if conn_return and self._update_handlers:
|
||||
if result and self._update_handlers:
|
||||
self._set_updates_thread(running=True)
|
||||
|
||||
return conn_return
|
||||
return result
|
||||
|
||||
|
||||
def disconnect(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user