Fix reconnect on TypeNotFoundError failing

This commit is contained in:
Lonami Exo 2017-09-18 10:21:53 +02:00
parent e0e3947d2f
commit e3ab98815d

View File

@ -136,18 +136,18 @@ class TelegramClient(TelegramBareClient):
# region Connecting
def connect(self, *args):
def connect(self, exported_auth=None):
"""Connects to the Telegram servers, executing authentication if
required. Note that authenticating to the Telegram servers is
not the same as authenticating the desired user itself, which
may require a call (or several) to 'sign_in' for the first time.
*args will be ignored.
exported_auth is meant for internal purposes and can be ignored.
"""
if self._sender and self._sender.is_connected():
return
ok = super().connect()
ok = super().connect(exported_auth=exported_auth)
# The main TelegramClient is the only one that will have
# constant_read, since it's also the only one who receives
# updates and need to be processed as soon as they occur.