async fn serve_http_until<C>(
listener: TcpListener,
state: AppState<C>,
shutdown: &ShutdownWatch,
) -> Result<(), DevError>Expand description
Serve HTTP on an already-bound listener until the listener fails or shutdown is signalled, then give outstanding requests a bounded drain before force-closing what is left.
Kernel WebSocket tunnels live for hours and never “finish”, so an
unbounded graceful drain would hang exit forever; after
HTTP_DRAIN_TIMEOUT the serve future is dropped, which closes the
remaining connections.