diff options
| author | tv <tv@krebsco.de> | 2026-10-24 04:20:21 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-24 04:21:11 +0200 |
| commit | c2468964b11bd3606f03375c370fd181a1723113 (patch) | |
| tree | 96c9c4a126efc928716491b4c110a4da7de6ead7 /src/swarm/peer.rs | |
| parent | 5710d1a367a1914d09e0eefe6984408c95a7dd2e (diff) | |
find reachable neighbours
Diffstat (limited to 'src/swarm/peer.rs')
| -rw-r--r-- | src/swarm/peer.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/swarm/peer.rs b/src/swarm/peer.rs index 7ab704f..a42f5a4 100644 --- a/src/swarm/peer.rs +++ b/src/swarm/peer.rs @@ -220,6 +220,7 @@ pub(crate) async fn send_hello_once(state: &AppState, peer: &str) -> Result<()> // A new handshake: retries start over. peer_state.hello_state = HelloState::Sending; peer_state.hello_backoff.reset(); + peer_state.hello_attempts = 0; true } else { trace!(peer = %peer, hello_state = ?peer_state.hello_state, "not sending"); @@ -282,6 +283,7 @@ async fn transmit_hello(state: &AppState, peer: &str) -> Result<()> { let mut peer_state = peer_state_mutex.lock().await; if peer_state.hello_state == HelloState::Sending { + peer_state.hello_sent(Instant::now()); let wait = match peer_state.liveness { Liveness::Dormant { .. } => state.timing.dormant_probe, Liveness::Active => peer_state.hello_backoff.next(), |
