mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Don't retry forever on TcpClient.connect()
This commit is contained in:
parent
5d9cf513bd
commit
e2a0de1913
|
@ -91,7 +91,9 @@ class TcpClient:
|
|||
# to none to recreate it on the next iteration
|
||||
self._socket = None
|
||||
time.sleep(timeout)
|
||||
timeout = min(timeout * 2, MAX_TIMEOUT)
|
||||
timeout *= 2
|
||||
if timeout > MAX_TIMEOUT:
|
||||
raise
|
||||
else:
|
||||
raise
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user