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 | 34989e5140eaa16e17a0ab4501e64e779215e3d1 (patch) | |
| tree | 3a7c5c784d487c3c6069605e4123ab1faa76e452 /src/swarm/sync.rs | |
| parent | 2d53123f93fe35993f317b00be71c7c8410e635b (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 })); } |
