aboutsummaryrefslogtreecommitdiffstats
path: root/src/state/host.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 03:47:04 +0100
committertv <tv@krebsco.de>2026-10-31 03:47:04 +0100
commit32f733d834a82538786388e00fec22016a25e0e5 (patch)
tree51f1ec11c609267c15d1d64f62d1fd661eed86c5 /src/state/host.rs
parentc5f18c52a92dda6a94b950b54bf77b109694a894 (diff)
unify source reset
Diffstat (limited to 'src/state/host.rs')
-rw-r--r--src/state/host.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/state/host.rs b/src/state/host.rs
index b55239d..ee67b80 100644
--- a/src/state/host.rs
+++ b/src/state/host.rs
@@ -13,7 +13,6 @@ use tracing::debug;
use super::{AppState, HelloState, NodeLifecycle, StaleView, Standing};
use crate::document::replica::Epoch;
-use crate::locks::MutexExt;
use crate::remake::{Host, PeerSummary, RemakeState};
use crate::swarm::sync::{ChangeSet, SyncEvent};
@@ -198,8 +197,8 @@ impl Host for AppState {
fn reset_initial_sync(&self) {
self.initial_sync_done
.store(false, std::sync::atomic::Ordering::Release);
- *self.catch_up_source.lock_or_recover() = None;
- *self.catch_up_preference.lock_or_recover() = None;
+ // The source chosen, and the one avoided, were for the catch-up before.
+ crate::swarm::source::reset(self);
}
fn subscribe_changes(&self) -> broadcast::Receiver<Arc<ChangeSet>> {