aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/sync.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-05 05:20:00 +0100
committertv <tv@krebsco.de>2026-11-05 05:20:00 +0100
commit18bc1b2e36bacae45ee3a0f485a117f3756152d7 (patch)
tree714ca665aa51bce43e144f398b40d57fccf08a0f /src/swarm/sync.rs
parent3f660a5886b8face0d9bd117cb63be9ed0cfd6f2 (diff)
push by default
Diffstat (limited to 'src/swarm/sync.rs')
-rw-r--r--src/swarm/sync.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs
index aea6a0b..e551cb8 100644
--- a/src/swarm/sync.rs
+++ b/src/swarm/sync.rs
@@ -138,7 +138,6 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> {
.map(|estimate| estimate.bytes_per_sec);
let failed = peer_state_mutex.lock().await.failed_whole(Instant::now());
let delta_threshold = state.blobs.delta_threshold_for(rate, failed);
- let push_changes = state.push_changes;
let stats = Arc::clone(&state.stats);
let clock = Arc::clone(&state.clock);
@@ -168,10 +167,10 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> {
delta_threshold,
Instant::now(),
);
- // Along a tree, taken as delivered: the changes as they are, if pushing
- // (`AppState::push_changes`). Only those too small to deflate: larger
- // ones go as a message, deflated (`compress`).
- let pushed = (push_changes && level && writer.is_some() && again.is_none())
+ // Along a tree, taken as delivered: the changes as they are
+ // (`SyncSession::push`). Only those too small to deflate: larger ones go
+ // as a message, deflated (`compress`).
+ let pushed = (level && writer.is_some() && again.is_none())
.then(|| {
peer_state.sync.push(
&replica.doc,