aboutsummaryrefslogtreecommitdiff
path: root/src/rpc_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-11 18:51:11 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-11 18:51:11 +0200
commit53289b69e5037700689665b4edf20f2382ff15f6 (patch)
treee9920e1dce29e94bfddc3812b44ee2519ba14bed /src/rpc_server.rs
parent4a2624b76afff714a70ee7a9e4ffd97c54c7ecc4 (diff)
downloadgarage-53289b69e5037700689665b4edf20f2382ff15f6.tar.gz
garage-53289b69e5037700689665b4edf20f2382ff15f6.zip
Background task runner that replaces tokio::spawn
Diffstat (limited to 'src/rpc_server.rs')
-rw-r--r--src/rpc_server.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpc_server.rs b/src/rpc_server.rs
index cbcfac79..98798614 100644
--- a/src/rpc_server.rs
+++ b/src/rpc_server.rs
@@ -90,7 +90,7 @@ async fn handler(
pub async fn run_rpc_server(
garage: Arc<Garage>,
shutdown_signal: impl Future<Output = ()>,
-) -> Result<(), hyper::Error> {
+) -> Result<(), Error> {
let bind_addr = ([0, 0, 0, 0], garage.system.config.rpc_port).into();
let service = make_service_fn(|conn: &AddrStream| {
@@ -112,5 +112,6 @@ pub async fn run_rpc_server(
let graceful = server.with_graceful_shutdown(shutdown_signal);
println!("RPC server listening on http://{}", bind_addr);
- graceful.await
+ graceful.await?;
+ Ok(())
}