isolate axum shutdown in router; minor run-cycle/signalling tweaks
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
e4aa20ebeb
commit
0e74ade7d7
8 changed files with 57 additions and 72 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue