aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/libp2p/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 13:29:34 +0100
committertv <tv@krebsco.de>2026-11-01 13:29:34 +0100
commit400c4e845998101b94780b101a400c04d38897da (patch)
tree8b75886e6eff27c36932218ae63b8418bad65238 /src/transport/libp2p/mod.rs
parent12fbf8bf78408abbfde0ec1802f39307def4a0ee (diff)
libp2p: bump dupe grace period
Diffstat (limited to 'src/transport/libp2p/mod.rs')
-rw-r--r--src/transport/libp2p/mod.rs11
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.