diff options
| author | tv <tv@krebsco.de> | 2026-11-30 14:30:17 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-30 14:30:17 +0000 |
| commit | 01a71c5ba7171feba8ed794b591b81c07b0f3d97 (patch) | |
| tree | e750d835d51ac8c9e105179a2eb43ec4f9e8c0df | |
| parent | c73199a2114916097703b846841413f61d79c5f9 (diff) | |
swarm: a seed whose first HELLO failed is said HELLO again
Its failing was logged as retried, and nothing retried it: a node that
is no neighbour yet gets no HELLO again from the peer worker. The seed
now stays with those still to reach, tried again as they are.
| -rw-r--r-- | src/swarm/bootstrap.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs index 7626d53..a0e4db7 100644 --- a/src/swarm/bootstrap.rs +++ b/src/swarm/bootstrap.rs @@ -549,6 +549,18 @@ async fn resolve_seeds( crate::swarm::roots::seed_found(state, &peer); if let Err(error) = send_hello_once(state, &peer).await { warn!(peer = %peer, error = %format!("{error:#}"), "Initial HELLO failed; will retry"); + // Again with the seeds that don't resolve yet: nothing else says + // HELLO again to a node that is no neighbour (`peer::worker`). + if let Some(peer_state) = state.get_peer_state(&peer).await { + let mut peer_state = peer_state.lock().await; + if matches!( + peer_state.hello_state, + crate::state::HelloState::AwaitingReply { .. } + ) { + peer_state.hello_state = crate::state::HelloState::NotSent; + } + } + still.push(seed); } } Err(error) => { |
