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