Skip to content

Commit

Permalink
feat(swarm): use NotDialing condition by default
Browse files Browse the repository at this point in the history
  • Loading branch information
b-zee committed Jul 11, 2023
1 parent 066f7d6 commit 5d0f1f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions swarm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## 0.43.1 - unreleased

- Change the default `PeerCondition` to `NotDialing`. This will prevent multiple simultaneous dials to the same peer, by default.
See [PR 4184].

[PR 4184]: https://github.com/libp2p/rust-libp2p/pull/4184

- Do not announce external address candidate before address translation, unless translation does not apply.
This will prevent ephemeral TCP addresses being announced as external address candidates.
See [PR 4158].
Expand Down
2 changes: 1 addition & 1 deletion swarm/src/dial_opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ pub enum PeerCondition {
/// A new dialing attempt is initiated _only if_ the peer is currently
/// considered disconnected, i.e. there is no established connection
/// and no ongoing dialing attempt.
#[default]
Disconnected,
/// A new dialing attempt is initiated _only if_ there is currently
/// no ongoing dialing attempt, i.e. the peer is either considered
/// disconnected or connected but without an ongoing dialing attempt.
#[default]
NotDialing,
/// A new dialing attempt is always initiated, only subject to the
/// configured connection limits.
Expand Down

0 comments on commit 5d0f1f9

Please sign in to comment.