Skip to content

armgit / strix

Public Imported from GitHub
0

Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.

fix: add initial delay and increase retries for tool server health check

0xallam4cb2cebd1e42
diff --git a/strix/runtime/docker_runtime.py b/strix/runtime/docker_runtime.py
index 1ae2975e..e42d00b9 100644
--- a/strix/runtime/docker_runtime.py
+++ b/strix/runtime/docker_runtime.py
@@ -78,10 +78,12 @@ class DockerRuntime(AbstractRuntime):
if port_bindings.get(port_key):
self._tool_server_port = int(port_bindings[port_key][0]["HostPort"])
- def _wait_for_tool_server(self, max_retries: int = 20, timeout: int = 5) -> None:
+ def _wait_for_tool_server(self, max_retries: int = 30, timeout: int = 5) -> None:
host = self._resolve_docker_host()
health_url = f"http://{host}:{self._tool_server_port}/health"
+ time.sleep(5)
+
for attempt in range(max_retries):
try:
with httpx.Client(trust_env=False, timeout=timeout) as client: