Skip to content

Commit 616d8d8

Browse files
authored
refactor: scripts/mcp.sh curl add timeout (#203)
1 parent 08e74de commit 616d8d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/mcp.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ generate-declarations() {
145145
# @cmd Wait for the mcp bridge server to ready
146146
wait-for-server() {
147147
while true; do
148-
if [[ "$(curl -fsS http://localhost:$MCP_BRIDGE_PORT/health 2>&1)" == "OK" ]]; then
148+
if [[ "$(curl -fsS --max-time 5 http://localhost:$MCP_BRIDGE_PORT/health 2>&1)" == "OK" ]]; then
149149
break;
150150
fi
151151
sleep 1
@@ -154,7 +154,7 @@ wait-for-server() {
154154

155155
# @cmd Get the server pid
156156
get-server-pid() {
157-
curl -fsSL http://localhost:$MCP_BRIDGE_PORT/pid 2>/dev/null || true
157+
curl -fsS --max-time 5 http://localhost:$MCP_BRIDGE_PORT/pid 2>/dev/null || true
158158
}
159159

160160
_ask_json_data() {

0 commit comments

Comments
 (0)