summaryrefslogtreecommitdiffstats
path: root/src/state.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-25 22:12:27 +0100
committertv <tv@krebsco.de>2026-10-25 22:12:27 +0100
commit34989e5140eaa16e17a0ab4501e64e779215e3d1 (patch)
tree3a7c5c784d487c3c6069605e4123ab1faa76e452 /src/state.rs
parent2d53123f93fe35993f317b00be71c7c8410e635b (diff)
recompute neighbours whenever topology changes
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs
index af01cf0..ee7fa7a 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -632,6 +632,9 @@ pub(crate) struct AppState {
pub(crate) announce_pending: Arc<std::sync::Mutex<Option<std::collections::HashSet<String>>>>,
/// Our neighbours, once known (`swarm::topology`).
pub(crate) neighbours: Arc<std::sync::RwLock<Option<crate::swarm::topology::NeighbourView>>>,
+ /// Something the neighbours are computed from may have changed: the member list or a
+ /// peer's reachability (`swarm::topology::run_worker`).
+ pub(crate) topology_changed: Arc<tokio::sync::Notify>,
/// While rejoining a newer epoch, the previous document, served read-only (and
/// marked stale) instead of answering 503.