pub async fn run<S>(
listener: Listener,
daemon: Arc<Daemon>,
shutdown: S,
) -> Result<Stopped>Expand description
Accept until shutdown resolves, then stop accepting, drain, and checkpoint.
The order is the contract’s: acceptance stops FIRST, so no connection starts
during the drain, then in-flight work gets at most DRAIN_TIMEOUT_SECS,
then the projections are snapshotted at the watermark — after the drain, so
the snapshot includes the last append rather than racing it — and only then
is the socket removed, and only if it is still the file this process created.