aboutsummaryrefslogtreecommitdiff
path: root/src/rpc.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-06 21:02:15 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-06 21:02:15 +0200
commit3c36b449a3786bb62fa023bde37bac24635b5717 (patch)
tree5bf18f069a4b32d3e7d04d13475c4995474d4c9b /src/rpc.rs
parent1a5e6e39af19d572a9de7f54e66bef911bdbbf2f (diff)
downloadgarage-3c36b449a3786bb62fa023bde37bac24635b5717.tar.gz
garage-3c36b449a3786bb62fa023bde37bac24635b5717.zip
Some work
Diffstat (limited to 'src/rpc.rs')
-rw-r--r--src/rpc.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rpc.rs b/src/rpc.rs
index 4ba32c4c..5e72d0f0 100644
--- a/src/rpc.rs
+++ b/src/rpc.rs
@@ -14,7 +14,6 @@ use crate::data::*;
use crate::error::Error;
use crate::proto::Message;
use crate::membership::System;
-use crate::membership;
// ---- CLIENT PART ----
@@ -133,8 +132,8 @@ async fn handler(sys: Arc<System>, req: Request<Body>, addr: SocketAddr) -> Resu
eprintln!("RPC from {}: {:?}", addr, msg);
let resp = err_to_msg(match &msg {
- Message::Ping(ping) => membership::handle_ping(sys, &addr, ping).await,
- Message::AdvertiseNode(adv) => membership::handle_advertise_node(sys, adv).await,
+ Message::Ping(ping) => sys.handle_ping(&addr, ping).await,
+ Message::AdvertiseNode(adv) => sys.handle_advertise_node(adv).await,
_ => Ok(Message::Error(format!("Unexpected message: {:?}", msg))),
});