Skip to content

Commit b6697e3

Browse files
committed
Made retry timing a tad more nuanced
1 parent 054bb4e commit b6697e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymyq/api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
API_BASE = "https://api.myqdevice.com/api/v{0}".format(API_VERSION)
1717

1818
DEFAULT_APP_ID = "JVM/G9Nwih5BwKgNCjLxiFUQxQijAebyyg8QUHr7JOrP+tuPb8iHfRHKwTmDzHOu"
19-
DEFAULT_REQUEST_RETRIES = 3
19+
DEFAULT_REQUEST_RETRIES = 5
2020
DEFAULT_STATE_UPDATE_INTERVAL = timedelta(seconds=5)
2121
DEFAULT_USER_AGENT = "Chamberlain/3.73"
2222

@@ -100,7 +100,7 @@ async def request(
100100
)
101101
)
102102

103-
wait_for = 2 ** attempt
103+
wait_for = min(2 ** attempt, 5)
104104

105105
_LOGGER.warning(
106106
"Device update failed; trying again in %s seconds", wait_for

0 commit comments

Comments
 (0)