diff options
| author | tv <tv@krebsco.de> | 2026-10-25 22:12:27 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-25 22:12:27 +0100 |
| commit | 30195e090077352bf6c79813a55bf6345df8ce8c (patch) | |
| tree | 5d1025e047e76dc0987756cac86517a31b1db262 /src/swarm/sync.rs | |
| parent | 1471fc37bbc9ace694d7481f26c3271a72f1bc66 (diff) | |
recompute neighbours whenever topology changes
Diffstat (limited to 'src/swarm/sync.rs')
| -rw-r--r-- | src/swarm/sync.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 93af6f7..d4503bb 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -608,6 +608,13 @@ pub(crate) async fn run_change_publisher(state: AppState) { warn!(path = ?path, "Concurrent writes produced a conflict"); } + if paths + .iter() + .any(|path| crate::swarm::topology::affects_neighbours(path)) + { + state.topology_changed.notify_one(); + } + // Fails only when nobody is subscribed. let _ = state.change_events.send(Arc::new(ChangeSet { paths })); } |
