summaryrefslogtreecommitdiffstats
path: root/src/api/peers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/peers.rs')
-rw-r--r--src/api/peers.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/peers.rs b/src/api/peers.rs
index 7caaaf3..919f187 100644
--- a/src/api/peers.rs
+++ b/src/api/peers.rs
@@ -182,7 +182,7 @@ pub(crate) async fn list_peers(
}
peers.sort_by(|a, b| a.public_key.cmp(&b.public_key));
- let local_heads = state.doc.write().await.doc.get_heads().len();
+ let local_heads = state.doc.read().await.heads().len();
Ok(Json(PeerListResponse {
local_alias: state.alias.clone(),
local_epoch: local_epoch.into(),