mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-19 03:26:39 +00: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
|
# to none to recreate it on the next iteration
|
||||||
self._socket = None
|
self._socket = None
|
||||||
time.sleep(timeout)
|
time.sleep(timeout)
|
||||||
timeout = min(timeout * 2, MAX_TIMEOUT)
|
timeout *= 2
|
||||||
|
if timeout > MAX_TIMEOUT:
|
||||||
|
raise
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user