pub fn serve_until<H>(
addr: &str,
workers: usize,
limits: Limits,
handler: H,
shutdown: Arc<AtomicBool>,
) -> Result<()>Expand description
Like serve, but stops accepting new connections once shutdown is set,
then drains in-flight requests (by dropping the pool, which joins workers)
and returns. This is what makes a sutegi process safe to roll in a pod: on
SIGTERM you flip the flag, stop taking traffic, and let live requests finish
within the termination grace period.