isolate axum shutdown in router; minor run-cycle/signalling tweaks

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-05 19:59:50 +00:00
parent e4aa20ebeb
commit 0e74ade7d7
8 changed files with 57 additions and 72 deletions

View file

@ -301,7 +301,7 @@ bad_signature_ratelimiter: {bad_signature_ratelimiter}
pub async fn interrupt(&self) {
trace!("Interrupting services...");
self.server.interrupt.store(true, atomic::Ordering::Release);
self.server.stopping.store(true, atomic::Ordering::Release);
self.globals.rotate.fire();
self.sending.interrupt();
@ -312,7 +312,7 @@ bad_signature_ratelimiter: {bad_signature_ratelimiter}
}
#[tracing::instrument(skip_all)]
pub async fn shutdown(&self) {
pub async fn stop(&self) {
info!("Shutting down services");
self.interrupt().await;