diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-08 23:43:59 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-08 23:43:59 +0100 |
commit | 5c63193d1de909cdecc501b482f5dc269a84874d (patch) | |
tree | cf34b848df170b3e3289754c77c4a9f61b97a260 /src/api/admin | |
parent | bcbd15da84181ad94ece7e794933a6ebd388f5bc (diff) | |
download | garage-5c63193d1de909cdecc501b482f5dc269a84874d.tar.gz garage-5c63193d1de909cdecc501b482f5dc269a84874d.zip |
[dep-upgrade-202402] fix shutdown issue introduced when upgrading hyperdep-upgrade-202402
Diffstat (limited to 'src/api/admin')
-rw-r--r-- | src/api/admin/api_server.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs index d5e1c777..50813d11 100644 --- a/src/api/admin/api_server.rs +++ b/src/api/admin/api_server.rs @@ -3,9 +3,9 @@ use std::sync::Arc; use async_trait::async_trait; -use futures::future::Future; use http::header::{ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ALLOW}; use hyper::{body::Incoming as IncomingBody, Request, Response, StatusCode}; +use tokio::sync::watch; use opentelemetry::trace::SpanRef; @@ -65,11 +65,11 @@ impl AdminApiServer { pub async fn run( self, bind_addr: UnixOrTCPSocketAddress, - shutdown_signal: impl Future<Output = ()>, + must_exit: watch::Receiver<bool>, ) -> Result<(), GarageError> { let region = self.garage.config.s3_api.s3_region.clone(); ApiServer::new(region, self) - .run_server(bind_addr, Some(0o220), shutdown_signal) + .run_server(bind_addr, Some(0o220), must_exit) .await } |