Skip to content

Commit

Permalink
Increase speedtest timeout + bump to 0.10.6 (#131)
Browse files Browse the repository at this point in the history
* increase speedtest timeout from 20 to 60 seconds

* bump to 0.10.6
  • Loading branch information
starkillerOG committed Jun 28, 2022
1 parent 84d57e8 commit 30e0c94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions pynetgear/router.py
Expand Up @@ -942,7 +942,7 @@ def get_speed_test_result(self):
Response Code = 1 means in progress
"""
_LOGGER.debug("Retrieving speed test result")
for _retry in range(1, 10):
for _retry in range(1, 30+1):
success, response = self._make_request(
c.SERVICE_ADVANCED_QOS,
c.GET_SPEED_TEST_RESULT,
Expand All @@ -963,14 +963,16 @@ def get_speed_test_result(self):
_LOGGER.debug("new speed test retrieved")
break
if node.text in ["1", "001"]: # test in progress
if _retry >= 10:
if _retry >= 30:
_LOGGER.warning(
"speed test still in progress while maximum"
" retries reached, returning partial results"
)
continue
_LOGGER.debug(
"speed test still in progress, sleep for 2 seconds"
"speed test still in progress after %i attempts, "
"sleep for 2 seconds",
_retry
)
sleep(2)
continue
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -2,7 +2,7 @@
from codecs import open

REPO_URL = "http://github.com/MatMaul/pynetgear"
VERSION = "0.10.5"
VERSION = "0.10.6"

with open("requirements.txt") as f:
required = f.read().splitlines()
Expand Down

0 comments on commit 30e0c94

Please sign in to comment.