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

fix(kad): prevent simultaneous dials to peer #4224

Merged
merged 3 commits into from
Jul 24, 2023

Conversation

b-zee
Copy link
Contributor

@b-zee b-zee commented Jul 20, 2023

Description

By default, dialing is prevented when already connected. kad already checks this manually before doing dials. By changing the condition from Disconnected to NotDialing, we prevent simultaneous dials to a peer.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

protocols/kad/CHANGELOG.md Outdated Show resolved Hide resolved
protocols/kad/CHANGELOG.md Outdated Show resolved Hide resolved
protocols/kad/CHANGELOG.md Outdated Show resolved Hide resolved
protocols/kad/Cargo.toml Show resolved Hide resolved
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready from my end :)

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for bearing with us!

@@ -1,3 +1,10 @@
## 0.44.3 - unreleased
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 0.44.3 - unreleased
## 0.44.3

Adding - unreleased is the way to go. Thank you. Though in this case I will cut a release right away.

@mergify mergify bot merged commit cf3cff1 into libp2p:master Jul 24, 2023
65 of 66 checks passed
@mxinden
Copy link
Member

mxinden commented Jul 24, 2023

Published and tagged.

//CC @b-zee

thomaseizinger pushed a commit that referenced this pull request Aug 20, 2023
By default, dialing is prevented when already connected. `kad` already checks this manually before doing dials. By changing the condition from `Disconnected` to `NotDialing`, we prevent simultaneous dials to a peer.

Pull-Request: #4224.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants