diff options
| author | tv <tv@krebsco.de> | 2026-11-05 00:02:16 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-05 00:02:16 +0100 |
| commit | ec9131e5b656ff6827cd99c9a939c7d018790bf1 (patch) | |
| tree | 5b4c65d2748f11d876d15e52199d8fb3e7761bf0 /src/swarm | |
| parent | 069debaf62d9ac5fed2e10aab35c31b2d7beeea6 (diff) | |
delta known to sender
Diffstat (limited to 'src/swarm')
| -rw-r--r-- | src/swarm/sync.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index dcb29a7..8059fe2 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -663,8 +663,14 @@ async fn download_and_apply_delta( stats.propagated(delays); } if let Some(peer_state) = peer_state { + let mut peer_state = peer_state.blocking_lock(); // Sync from it made progress: no heal for a while (`keepalive`). - peer_state.blocking_lock().last_sync_rx = Some(Instant::now()); + peer_state.last_sync_rx = Some(Instant::now()); + if changed { + // From its history: none goes back (`SyncSession::came_from_peer`), nor + // is offered back as a delta. + peer_state.sync.came_from_peer(&replica.doc, &heads_before); + } } Ok(changed) }) |
