feat(swarm): don't have ConnectionHandlers close connections#4755
Merged
mergify[bot] merged 15 commits intomasterfrom Nov 2, 2023
Merged
feat(swarm): don't have ConnectionHandlers close connections#4755mergify[bot] merged 15 commits intomasterfrom
ConnectionHandlers close connections#4755mergify[bot] merged 15 commits intomasterfrom
Conversation
This commit purposely does not touch any protocol crates to avoid merge conflicts.
Member
|
Let me know once this is ready for a review. Direction looking good. |
Contributor
Author
Needs all linked PRs to merge first before the build is green, otherwise ready for review :) |
Contributor
Author
|
@mxinden All dependencies of this PR have been merged so this is ready for review. |
thomaseizinger
commented
Nov 1, 2023
Contributor
|
This pull request has merge conflicts. Could you please resolve them @thomaseizinger? 🙏 |
mxinden
approved these changes
Nov 2, 2023
Member
mxinden
left a comment
There was a problem hiding this comment.
Great to see this final step.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the long-awaited design of disallowing
ConnectionHandlers to close entire connections. Instead, users should close connections viaToSwarm::CloseConnectionfrom aNetworkBehaviouror - even better - from theSwarmviaclose_connection. ANetworkBehaviouralso does not have a "full" view onto how a connection is used but at least it can correlate whether it created the connection via theConnectionId. In general, the more modular and friendly approach is to stop "using" a connection if a particular protocol no longer needs it. As a result of the keep-alive algorithm, such a connection is then closed automatically.Depends-on: #4745.
Depends-on: #4718.
Depends-on: #4749.
Related: #3353.
Related: #4714.
Resolves: #3591.
Notes & open questions
Change checklist