Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(swarm): use NotDialing condition by default #4185

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 4185].

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

- 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