diff options
| author | sigoden <sigoden@gmail.com> | 2025-06-25 17:46:01 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-25 17:46:01 +0800 |
| commit | 616d8d84c5565fdb66d8782ae5ba56d994bfa82a (patch) | |
| tree | 01c9cb329e9f57dec1419189e05ad51227af9545 | |
| parent | 08e74dec0691fb1ee10f299650b89d63d554c21b (diff) | |
| download | llm-functions-docker-616d8d84c5565fdb66d8782ae5ba56d994bfa82a.tar.gz | |
refactor: scripts/mcp.sh curl add timeout (#203)
| -rwxr-xr-x | scripts/mcp.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mcp.sh b/scripts/mcp.sh index e7e93fd..f365f61 100755 --- a/scripts/mcp.sh +++ b/scripts/mcp.sh @@ -145,7 +145,7 @@ generate-declarations() { # @cmd Wait for the mcp bridge server to ready wait-for-server() { while true; do - if [[ "$(curl -fsS http://localhost:$MCP_BRIDGE_PORT/health 2>&1)" == "OK" ]]; then + if [[ "$(curl -fsS --max-time 5 http://localhost:$MCP_BRIDGE_PORT/health 2>&1)" == "OK" ]]; then break; fi sleep 1 @@ -154,7 +154,7 @@ wait-for-server() { # @cmd Get the server pid get-server-pid() { - curl -fsSL http://localhost:$MCP_BRIDGE_PORT/pid 2>/dev/null || true + curl -fsS --max-time 5 http://localhost:$MCP_BRIDGE_PORT/pid 2>/dev/null || true } _ask_json_data() { |
