aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v/api_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-08 23:43:59 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-08 23:43:59 +0100
commit5c63193d1de909cdecc501b482f5dc269a84874d (patch)
treecf34b848df170b3e3289754c77c4a9f61b97a260 /src/api/k2v/api_server.rs
parentbcbd15da84181ad94ece7e794933a6ebd388f5bc (diff)
downloadgarage-5c63193d1de909cdecc501b482f5dc269a84874d.tar.gz
garage-5c63193d1de909cdecc501b482f5dc269a84874d.zip
[dep-upgrade-202402] fix shutdown issue introduced when upgrading hyperdep-upgrade-202402
Diffstat (limited to 'src/api/k2v/api_server.rs')
-rw-r--r--src/api/k2v/api_server.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs
index 128742c4..e97da2af 100644
--- a/src/api/k2v/api_server.rs
+++ b/src/api/k2v/api_server.rs
@@ -2,8 +2,8 @@ use std::sync::Arc;
use async_trait::async_trait;
-use futures::future::Future;
use hyper::{body::Incoming as IncomingBody, Method, Request, Response};
+use tokio::sync::watch;
use opentelemetry::{trace::SpanRef, KeyValue};
@@ -42,10 +42,10 @@ impl K2VApiServer {
garage: Arc<Garage>,
bind_addr: UnixOrTCPSocketAddress,
s3_region: String,
- shutdown_signal: impl Future<Output = ()>,
+ must_exit: watch::Receiver<bool>,
) -> Result<(), GarageError> {
ApiServer::new(s3_region, K2VApiServer { garage })
- .run_server(bind_addr, None, shutdown_signal)
+ .run_server(bind_addr, None, must_exit)
.await
}
}