We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33ffe35 commit 6ba9158Copy full SHA for 6ba9158
1 file changed
cforge/commands/server/run.py
@@ -180,13 +180,18 @@ def run(
180
# Wait for the server to come up
181
server_url_base = f"http://{host}:{port}"
182
start_time = time.time()
183
+ ready = False
184
while time.time() - start_time <= register_timeout:
185
try:
186
res = requests.get(f"{server_url_base}/healthz", timeout=0.1)
187
if res.status_code == 200:
188
+ ready = True
189
break
190
except requests.exceptions.ConnectionError:
191
time.sleep(0.5)
192
+ if not ready:
193
+ console.print(f"[red]Failed to connect to server in {register_timeout}s[/red]")
194
+ typer.exit(1)
195
196
# Build the server URL based on the protocol
197
server_url = f"{server_url_base}{sse_path}" if is_sse else f"{server_url_base}/mcp"
0 commit comments