aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-06 07:02:57 +0100
committertv <tv@krebsco.de>2026-11-06 07:02:57 +0100
commit6ee43b664d03752aab3095d020eaa90cf96d7ba0 (patch)
tree079e79e7ac77f183f4e0a828e9addd26d5afa7cf /src/swarm
parent19461552f88e8b82a24c63c00a6591996ae8f45d (diff)
handshakes counted
Diffstat (limited to 'src/swarm')
-rw-r--r--src/swarm/peer/handshake.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/swarm/peer/handshake.rs b/src/swarm/peer/handshake.rs
index 92216fd..b964064 100644
--- a/src/swarm/peer/handshake.rs
+++ b/src/swarm/peer/handshake.rs
@@ -440,6 +440,13 @@ pub(super) async fn establish_peer(
// resets: it starts over with us. Its resent HELLOs and duplicate replies (caused by
// our own retries) don't.
peer_state.reports_ready = Some(ready);
+ if from_hello && let Some(count) = peer_state.handshake_started(tokio::time::Instant::now()) {
+ warn!(
+ peer = %peer,
+ handshakes = count,
+ "Peer started many handshakes within a minute (a restart loop?); each resets our session with it"
+ );
+ }
if from_hello || peer_state.hello_state != HelloState::Established {
peer_state.hello_state = HelloState::Established;
peer_state.reset_sync();