From b88398e743935c5975571e8b4fcb54c929ddc5e8 Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Wed, 1 May 2024 16:47:05 +0300 Subject: [PATCH] fix(iroh-sync): Ignore all gossip events that are not for the sync engine --- iroh/src/sync_engine/gossip.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iroh/src/sync_engine/gossip.rs b/iroh/src/sync_engine/gossip.rs index 86853cab38..5c5d9e6806 100644 --- a/iroh/src/sync_engine/gossip.rs +++ b/iroh/src/sync_engine/gossip.rs @@ -147,6 +147,10 @@ impl GossipActor { }, }; let namespace: NamespaceId = topic.as_bytes().into(); + if !self.joined.contains(&namespace) && !self.want_join.contains(&namespace) { + trace!(namespace = %namespace.fmt_short(), "received gossip event for unknown topic"); + return Ok(()); + } if let Err(err) = self.on_gossip_event_inner(namespace, event).await { error!(namespace = %namespace.fmt_short(), ?err, "Failed to process gossip event"); }