This commit is contained in:
ferferga 2018-04-10 18:57:21 +00:00 committed by GitHub
commit f64ec86c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,7 +297,14 @@ class TelegramClient(TelegramBareClient):
'must only provide one of either')
if not self.is_connected():
self.connect()
connected = self.connect()
while connected is not True:
print("Couldn't establish a connection to Telegram's servers. Check your connection. Trying again...")
connected2 = self.connect()
if connected2 is True:
break
else:
continue
if self.is_user_authorized():
self._check_events_pending_resolve()