From 0d0dcbd3a1fe03a51de70db4dc6154122f61e9d8 Mon Sep 17 00:00:00 2001 From: chad Date: Thu, 30 Jun 2022 22:50:49 -0500 Subject: [PATCH] swarm/src/connection: update dial concurrency factor default value to > 8 (#2678) --- swarm/CHANGELOG.md | 3 +++ swarm/src/connection/pool.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/swarm/CHANGELOG.md b/swarm/CHANGELOG.md index 463d406add70..283fc4c56ff4 100644 --- a/swarm/CHANGELOG.md +++ b/swarm/CHANGELOG.md @@ -4,8 +4,11 @@ - Extend log message when exceeding inbound negotiating streams with peer ID and limit. See [PR 2716]. +- Update dial address concurrency factor to `8` via `Swarm::dial_concurrency_factor`. See [PR 2780]. + [PR 2716]: https://github.com/libp2p/rust-libp2p/pull/2716/ +[PR 2780]: https://github.com/libp2p/rust-libp2p/pull/2780/ # 0.36.1 - Limit negotiating inbound substreams per connection. See [PR 2697]. diff --git a/swarm/src/connection/pool.rs b/swarm/src/connection/pool.rs index 10fc29a81205..d79080f1d0f9 100644 --- a/swarm/src/connection/pool.rs +++ b/swarm/src/connection/pool.rs @@ -1176,7 +1176,7 @@ impl Default for PoolConfig { task_event_buffer_size: 32, task_command_buffer_size: 7, // By default, addresses of a single connection attempt are dialed in sequence. - dial_concurrency_factor: NonZeroU8::new(1).expect("1 > 0"), + dial_concurrency_factor: NonZeroU8::new(8).expect("8 > 0"), substream_upgrade_protocol_override: None, max_negotiating_inbound_streams: 128, }