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

Disallow duplicate connections between peers #1682

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

sistemd
Copy link
Contributor

@sistemd sistemd commented Jan 17, 2024

If a peer attempts to open a new connection while an existing connection is already open, close the new connection.

Part of #1670.

@sistemd sistemd changed the base branch from main to sistemd/peer-connection-timeout January 17, 2024 16:50
crates/p2p/src/main_loop.rs Outdated Show resolved Hide resolved
crates/p2p/src/main_loop.rs Outdated Show resolved Hide resolved
@sistemd sistemd marked this pull request as ready for review January 17, 2024 22:42
@sistemd sistemd requested review from pierre-l and a team as code owners January 17, 2024 22:42
Copy link
Member

@CHr15F0x CHr15F0x left a comment

Choose a reason for hiding this comment

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

LGTM 👍


I'm also in favor of lowering the level of those logs.

@sistemd sistemd force-pushed the sistemd/peer-connection-timeout branch from 9c39beb to 261f2d0 Compare January 18, 2024 17:12
@sistemd sistemd force-pushed the sistemd/peer-no-duplicate-connections branch from 463930e to 1f332f9 Compare January 18, 2024 18:47
@sistemd sistemd force-pushed the sistemd/peer-connection-timeout branch from 9ba37c6 to 8ea96ef Compare January 19, 2024 15:31
Base automatically changed from sistemd/peer-connection-timeout to main January 19, 2024 16:26
@sistemd sistemd force-pushed the sistemd/peer-no-duplicate-connections branch from b24cb91 to 29fe1d7 Compare January 19, 2024 16:29
@sistemd sistemd merged commit 442a72f into main Jan 19, 2024
7 checks passed
@sistemd sistemd deleted the sistemd/peer-no-duplicate-connections branch January 19, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants