fix(webui): detach without waiting for gateway shutdown

This commit is contained in:
chengyongru
2026-08-19 16:34:07 +08:00
committed by chengyongru
parent 242f417370
commit 2e9c9781e6
2 changed files with 31 additions and 7 deletions
+2 -6
View File
@@ -326,10 +326,7 @@ def webui(
raise typer.Exit(1) from exc
return
finally:
if lease.release():
console.print(
"[dim]Last local client exited; the on-demand gateway was stopped.[/dim]"
)
lease.release(wait_for_stop=False)
gateway_port_taken = gateway_ready or _tcp_endpoint_reachable(
_host_for_local_browser(runtime_config.gateway.host),
@@ -372,5 +369,4 @@ def webui(
_open_webui_browser(webui_url)
_attach_to_background_gateway(runtime)
finally:
if lease.release():
console.print("[dim]Last local client exited; the on-demand gateway was stopped.[/dim]")
lease.release(wait_for_stop=False)