summaryrefslogtreecommitdiffstats
path: root/src/swarm/topology.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 17:50:58 +0100
committertv <tv@krebsco.de>2026-10-26 17:50:58 +0100
commitc64c2d283ae99581bf5f06fed0303f7f2d82f980 (patch)
tree31940b8c9ef8a3ca3e1af58b588ca4dc435efed2 /src/swarm/topology.rs
parent03807a3c7b33c67293f496b4f1222719113f80bb (diff)
unreachability doesn't expire
Diffstat (limited to 'src/swarm/topology.rs')
-rw-r--r--src/swarm/topology.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/swarm/topology.rs b/src/swarm/topology.rs
index e396a9d..84ae1cd 100644
--- a/src/swarm/topology.rs
+++ b/src/swarm/topology.rs
@@ -20,7 +20,6 @@
use std::collections::{BTreeMap, BTreeSet};
use sha2::{Digest, Sha256};
-use tokio::time::Instant;
use tracing::info;
use crate::locks::RwLockExt;
@@ -111,8 +110,7 @@ pub(crate) struct NeighbourChange {
/// Recomputes the neighbours whenever something they depend on may have changed
/// (`AppState::topology_changed`): the member list (`swarm::sync::run_change_publisher`),
/// a peer becoming unreachable or reachable again (`swarm::peer`), and every 5 s as a
-/// fallback, which also covers unreachability expiring after `dormant_probe`. A burst of
-/// notifications coalesces into one recomputation.
+/// fallback. A burst of notifications coalesces into one recomputation.
pub(crate) async fn run_worker(state: AppState) {
loop {
state.topology_changed.notified().await;
@@ -145,11 +143,10 @@ pub(crate) async fn refresh(state: &AppState) -> Option<NeighbourChange> {
(current, stable)
};
let k = state.neighbours_k;
- let now = Instant::now();
let mut unreachable = BTreeSet::new();
for member in &current {
if let Some(peer_state) = state.get_peer_state(member).await {
- if peer_state.lock().await.is_unreachable(&state.timing, now) {
+ if peer_state.lock().await.is_unreachable() {
unreachable.insert(member.clone());
}
}