aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/relay.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 19:53:27 +0100
committertv <tv@krebsco.de>2026-10-31 19:56:13 +0100
commitc3ddce0106d19fc3d37465f71ce50444871655b6 (patch)
treea22b3d350bc4be9157ad4cf574eafee689b997c7 /src/swarm/relay.rs
parentdfe0daa99e6e545f647715b73929cc3e244e8e0d (diff)
use Automerge as Document instead of AutoCommit
This allows a lot of operations to drop mut.
Diffstat (limited to 'src/swarm/relay.rs')
-rw-r--r--src/swarm/relay.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/swarm/relay.rs b/src/swarm/relay.rs
index d11c3e0..1736cec 100644
--- a/src/swarm/relay.rs
+++ b/src/swarm/relay.rs
@@ -131,8 +131,8 @@ pub(crate) async fn pull_if_behind(
// Those of the listed heads we lack. With a digest only a sample is listed; if we
// have all of it, a later keepalive lists others.
let missing = {
- let mut replica = state.doc.write().await;
- crate::document::changes::missing(&mut replica.doc, remote.heads.listed())
+ let replica = state.doc.read().await;
+ crate::document::changes::missing(&replica.doc, remote.heads.listed())
};
if missing.is_empty() {
return false;