Skip to main content

serve_tls_until

Function serve_tls_until 

Source
pub async fn serve_tls_until(
    listener: TcpListener,
    router: Router,
    config: Arc<ServerConfig>,
    stopped: impl Future<Output = ()> + Send + 'static,
    drain: Duration,
) -> Result<()>
Expand description

serve_tls, stopping when stopped resolves rather than on a signal observed from here on, and waiting drain rather than SHUTDOWN_GRACE for requests in flight. A process whose startup runs after its handlers are installed passes Stopping::wait, so a stop sent during that startup is not lost.