diff options
| author | tv <tv@krebsco.de> | 2026-11-01 13:29:34 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-01 13:29:34 +0100 |
| commit | fec2900523cba5a70b7f0f67f2b132c7a655a926 (patch) | |
| tree | 60f2a4e0ab6dbafe572154dc1cd1cd9ebfd1cc7a /src/transport/libp2p/mod.rs | |
| parent | 497eab7136b9d35101f4a5ffa81797efb85da390 (diff) | |
libp2p: bump dupe grace period
Diffstat (limited to 'src/transport/libp2p/mod.rs')
| -rw-r--r-- | src/transport/libp2p/mod.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/transport/libp2p/mod.rs b/src/transport/libp2p/mod.rs index 0d26625..6c57867 100644 --- a/src/transport/libp2p/mod.rs +++ b/src/transport/libp2p/mod.rs @@ -190,11 +190,12 @@ const EXPLORED_AT_ONCE: usize = 4; /// mentioned every few seconds (`swarm::topology`). Checked every `PRUNE_EVERY`. const STALE_AFTER: Duration = Duration::from_secs(600); const PRUNE_EVERY: Duration = Duration::from_secs(60); -/// Several connections to one peer (both dialled at once, or AutoNAT dialled back to -/// see whether it can) are cut to one, the fastest (`Book::duplicates`), this long after -/// the last one opened: long enough for what it was dialled for, and for each to be -/// pinged (at once, as it opens). Looked for every `DEDUPE_EVERY`. -const DUPLICATE_GRACE: Duration = Duration::from_secs(10); +/// Several connections to one peer (both dialled at once, AutoNAT dialling back to see +/// whether it can, or a better path explored) are cut to one, the fastest +/// (`Book::duplicates`), this long after the last one opened: long enough for what it +/// was dialled for, and for each to be pinged since (a new one at once, as it opens; +/// the others within libp2p's ping interval, 15 s). Looked for every `DEDUPE_EVERY`. +const DUPLICATE_GRACE: Duration = Duration::from_secs(20); /// The same while a peer is connected only through relays: a new relayed connection is /// a hole punch under way (`PUNCH_RETRIES`), which takes its tries (up to a QUIC /// handshake's 5 s each, three times) on that connection. |
