mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-16 22:57:53 +08:00
- Add server.shutdown-timeout config (default 0 = immediate close, preserving #6094 behavior); positive values drain in-flight HTTP requests via http.Server.Shutdown bounded by the configured seconds, then force-close the rest. - Bound the drain by the configured timeout even when the caller's context is more generous, while a tighter parent deadline still wins; hijacked WebSocket connections remain managed by their own handlers. - Cover drain completion, budget-expiry fallback, tighter parent ctx, zero default, and v8/legacy config parsing in tests. Closes: #7475 Co-authored-by: Dylan <1990016@gmail.com> Co-authored-by: lzt404 <2596933790@qq.com>