fix: set a maximium sleep time when retrying to connect to the funding source (#2622)

---------

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
blackcoffeexbt 2024-08-01 12:02:55 +01:00 committed by GitHub
parent ce0aff206d
commit 7d8fad267a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -206,7 +206,7 @@ async def check_funding_source() -> None:
break
retry_counter += 1
sleep_time = 0.25 * (2**retry_counter)
sleep_time = min(0.25 * (2**retry_counter), 60)
logger.warning(
f"Retrying connection to backend in {sleep_time} seconds... "
f"({retry_counter}/{max_retries})"