aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2025-06-25 17:46:01 +0800
committerGitHub <noreply@github.com>2025-06-25 17:46:01 +0800
commit616d8d84c5565fdb66d8782ae5ba56d994bfa82a (patch)
tree01c9cb329e9f57dec1419189e05ad51227af9545
parent08e74dec0691fb1ee10f299650b89d63d554c21b (diff)
downloadllm-functions-docker-616d8d84c5565fdb66d8782ae5ba56d994bfa82a.tar.gz
refactor: scripts/mcp.sh curl add timeout (#203)
-rwxr-xr-xscripts/mcp.sh4
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() {