From 86c4279fe22a1f18f63c999919da455b7a366549 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 | 4 +++- swarm/src/connection/pool.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/swarm/CHANGELOG.md b/swarm/CHANGELOG.md index 300e4e96a09d..a9f502fc52a3 100644 --- a/swarm/CHANGELOG.md +++ b/swarm/CHANGELOG.md @@ -6,9 +6,11 @@ - Remove `connection::ListenersStream` and poll the `Transport` directly. See [PR 2652]. +- Update dial address concurrency factor to `8`, thus dialing up to 8 addresses concurrently for a single connection attempt. See `Swarm::dial_concurrency_factor` and [PR 2741]. + [PR 2716]: https://github.com/libp2p/rust-libp2p/pull/2716/ [PR 2652]: https://github.com/libp2p/rust-libp2p/pull/2652 - +[PR 2780]: https://github.com/libp2p/rust-libp2p/pull/2741/ # 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..a4351ea1a4f3 100644 --- a/swarm/src/connection/pool.rs +++ b/swarm/src/connection/pool.rs @@ -1175,8 +1175,8 @@ impl Default for PoolConfig { executor: None, 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"), + // Set to a default of 8 based on regular frequence of dialer connections + dial_concurrency_factor: NonZeroU8::new(8).expect("8 > 0"), substream_upgrade_protocol_override: None, max_negotiating_inbound_streams: 128, }