From ce3d333397ce3ee9d3b6843b3e6d3d0d7b21bde3 Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Sun, 7 Apr 2024 16:19:22 -0400 Subject: [PATCH] fanout seeding --- veilid-core/src/rpc_processor/fanout_call.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/veilid-core/src/rpc_processor/fanout_call.rs b/veilid-core/src/rpc_processor/fanout_call.rs index 22f4e155..9399a171 100644 --- a/veilid-core/src/rpc_processor/fanout_call.rs +++ b/veilid-core/src/rpc_processor/fanout_call.rs @@ -284,14 +284,13 @@ where }; // Initialize closest nodes list - if init_fanout_queue.is_empty() { - if let Err(e) = self.clone().init_closest_nodes() { - return TimeoutOr::value(Err(e)); - } - } else { - self.clone().add_to_fanout_queue(&init_fanout_queue); + if let Err(e) = self.clone().init_closest_nodes() { + return TimeoutOr::value(Err(e)); } + // Ensure we include the most recent nodes + self.clone().add_to_fanout_queue(&init_fanout_queue); + // Do a quick check to see if we're already done { let mut ctx = self.context.lock();