Skip to content

Commit

Permalink
fix(network): trigger the initial bootstrap process for clients and n…
Browse files Browse the repository at this point in the history
…odes
  • Loading branch information
RolandSherwin committed Feb 20, 2025
1 parent dcf2eb9 commit 3d14ee5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ant-networking/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,11 @@ impl SwarmDriver {
);
}

if self.is_client {
self.initial_bootstrap
.trigger_initial_bootstrap(&mut self.swarm, self.peers_in_rt);
}

// temporarily skip processing IncomingConnectionError swarm event to avoid log spamming
let mut previous_incoming_connection_error_event = None;
loop {
Expand Down
5 changes: 5 additions & 0 deletions ant-networking/src/event/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ impl SwarmDriver {
debug!("All our external addresses: {all_external_addresses:?}");
}

if !self.is_client {
self.initial_bootstrap
.trigger_initial_bootstrap(&mut self.swarm, self.peers_in_rt);
}

self.send_event(NetworkEvent::NewListenAddr(address.clone()));
}
SwarmEvent::ListenerClosed {
Expand Down

0 comments on commit 3d14ee5

Please sign in to comment.