#68 Feature request: graceful shutdown

Opened by daviessm on Feb 4, 2022, 4:15 PM
// daviessm on Feb 4, 2022, 4:15 PM

I’d like to be able to listen for a shutdown signal and have the thrussh server shut down like in warp:

pub fn bind_with_graceful_shutdown(
    self,
    addr: impl Into<SocketAddr> + 'static,
    signal: impl Future<Output = ()> + Send + 'static
) -> (SocketAddr, impl Future<Output = ()> + 'static)