aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm/sync.rs')
-rw-r--r--src/swarm/sync.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs
index 5e736a1..3939377 100644
--- a/src/swarm/sync.rs
+++ b/src/swarm/sync.rs
@@ -63,10 +63,10 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> {
}
}
- // A set of events is passed on otherwise (`swarm::set`): of the Automerge document
- // a node holds beside one, nothing.
+ // A set of events is passed on otherwise (`swarm::set`): with a peer that holds
+ // one, and of the Automerge document a node holds beside one alone, no sync.
#[cfg(feature = "federation")]
- if state.of_a_set() {
+ if state.of_a_set() || crate::swarm::set::holds_a_set(state, peer).await {
return Ok(());
}