Expand description
Shutdown signal and background tasks
When the server is asked to stop (CTRL+C, SIGTERM, or the future given to
App::serve_with_shutdown completes) it stops accepting connections, tells
idle keep-alive connections to close, lets in-flight requests finish, and
waits for background tasks, each at most
App::shutdown_grace (default 10 s). Long-lived work such as SSE streams,
WebSocket handlers and periodic jobs should watch Shutdown to end
promptly instead of running into that limit.