Skip to content

Commit 7aced1b

Browse files
authored
Merge pull request #606 from AutomationSolutionz/bug-101-debug-not-working-slow-network
Added 40 seconds timeout so it retries on slow network
2 parents 43946ab + c9dc429 commit 7aced1b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Framework/deploy_handler/long_poll_handler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from urllib.parse import urlparse
1212

1313
from Framework.Utilities import RequestFormatter, ConfigModule, CommonUtil
14+
from Framework.Utilities.RequestFormatter import REQUEST_TIMEOUT
1415
from Framework.node_server_state import STATE
1516
from concurrent.futures import ThreadPoolExecutor
1617

@@ -304,7 +305,7 @@ def run(self, host: str) -> None:
304305

305306
reconnect = False
306307
server_online = True
307-
except requests.exceptions.ReadTimeout:
308+
except requests.exceptions.Timeout:
308309
pass
309310
except Exception:
310311
traceback.print_exc()
@@ -313,7 +314,7 @@ def run(self, host: str) -> None:
313314
def fetch(self, host) -> requests.Response | None:
314315
executor = ThreadPoolExecutor(max_workers=1)
315316
future = executor.submit(
316-
lambda: RequestFormatter.request("get", host, verify=False)
317+
lambda: RequestFormatter.request("get", host, verify=False, timeout=40)
317318
)
318319

319320
while not future.done():

0 commit comments

Comments
 (0)