mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-09 08:00:53 +03:00
Reduce indent level to simplify flow on __call__
This commit is contained in:
parent
778c844a64
commit
959e824c1c
|
@ -423,9 +423,11 @@ class TelegramBareClient:
|
|||
result = self._invoke(
|
||||
sender, call_receive, update_state, *requests
|
||||
)
|
||||
if result is None:
|
||||
sleep(1)
|
||||
if result is not None:
|
||||
return result
|
||||
|
||||
self._logger.debug('RPC failed. Attempting reconnection.')
|
||||
sleep(1)
|
||||
# The ReadThread has priority when attempting reconnection,
|
||||
# since this thread is constantly running while __call__ is
|
||||
# only done sometimes. Here try connecting only once/retry.
|
||||
|
@ -435,8 +437,6 @@ class TelegramBareClient:
|
|||
self._reconnect()
|
||||
else:
|
||||
sender.connect()
|
||||
else:
|
||||
return result
|
||||
|
||||
raise ValueError('Number of retries reached 0.')
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue
Block a user