Skip to content

Commit

Permalink
fix: increase minimum retry delay to 15 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Jan 28, 2020
1 parent 2c85b80 commit fad88bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teslajsonpy/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def valid_result(result):
)
if not result:
if retries < 5:
await asyncio.sleep(sleep_delay ** (retries + 2))
await asyncio.sleep(15 + sleep_delay ** (retries + 2))
retries += 1
continue
inst.car_online[inst._id_to_vin(car_id)] = False
Expand All @@ -272,7 +272,7 @@ def valid_result(result):
kwargs,
)
while not valid_result(result):
await asyncio.sleep(sleep_delay ** (retries + 1))
await asyncio.sleep(15 + sleep_delay ** (retries + 1))
try:
result = await func(*args, **kwargs)
_LOGGER.debug(
Expand Down

0 comments on commit fad88bc

Please sign in to comment.