aboutsummaryrefslogtreecommitdiff
path: root/src/rpc_client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc_client.rs')
-rw-r--r--src/rpc_client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc_client.rs b/src/rpc_client.rs
index 7587782e..8d8b724b 100644
--- a/src/rpc_client.rs
+++ b/src/rpc_client.rs
@@ -79,8 +79,8 @@ pub async fn rpc_call(
timeout: Duration,
) -> Result<Message, Error> {
let addr = {
- let members = sys.members.read().await;
- match members.status.get(to) {
+ let status = sys.status.borrow().clone();
+ match status.nodes.get(to) {
Some(status) => status.addr.clone(),
None => return Err(Error::Message(format!("Peer ID not found"))),
}