mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-24 00:04:14 +03:00
Reconnect if invoking failed (#270)
This commit is contained in:
parent
5a57a8a498
commit
99512875a2
|
@ -428,7 +428,10 @@ class TelegramBareClient:
|
|||
result = self._invoke(
|
||||
sender, call_receive, update_state, *requests
|
||||
)
|
||||
if result is not None:
|
||||
if result is None:
|
||||
sleep(1)
|
||||
self._reconnect()
|
||||
else:
|
||||
return result
|
||||
|
||||
raise ValueError('Number of retries reached 0.')
|
||||
|
|
Loading…
Reference in New Issue
Block a user