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(swarm): implement ConnectionHandler::poll_close for combinators #4794

Merged
merged 7 commits into from
Nov 5, 2023

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Nov 2, 2023

Description

Follow-up to #4076.

This is especially relevant since libp2p-swarm-derive uses SelectConnectionHandler.

Notes & open questions

@thomaseizinger once this is merged, should we backport it to v0.52?

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

Follow-up to libp2p#4076.

This is especially relevant since `libp2p-swarm-derive` uses `SelectConnectionHandler`.
@mxinden mxinden added this to the v0.53.0 milestone Nov 2, 2023
@mxinden mxinden marked this pull request as ready for review November 2, 2023 19:13
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.

Oh nice catch!

Did this land in v0.52? I thought we only shipped this together with the removal of the handler field from the error?

swarm/src/behaviour/toggle.rs Outdated Show resolved Hide resolved
swarm/src/handler/select.rs Outdated Show resolved Hide resolved
@thomaseizinger thomaseizinger changed the title fix(swarm): implement ConnectionHandler::poll_close for combinators fix(swarm): implement ConnectionHandler::poll_close for combinators Nov 2, 2023
@thomaseizinger
Copy link
Contributor

thomaseizinger commented Nov 2, 2023

@mxinden I fixed the compile errors and simplified some of the implementations by relying on the now documented requirement forfuse-like behaviour. This greatly simplifies things and is safe to rely on IMO.

@thomaseizinger thomaseizinger mentioned this pull request Nov 3, 2023
Copy link
Member Author

@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.

Requiring fuse like behavior sounds good to me.

Thank you for the additional commits.

@mxinden mxinden added the send-it label Nov 4, 2023
@mxinden
Copy link
Member Author

mxinden commented Nov 4, 2023

Mind approving this pull request @thomaseizinger?

@mxinden
Copy link
Member Author

mxinden commented Nov 4, 2023

Did this land in v0.52? I thought we only shipped this together with the removal of the handler field from the error?

I am probably mistaken. Let's ignore v0.52 in this context then.

@thomaseizinger thomaseizinger added the internal-change Pull requests that make internal changes to crates and thus don't need to include a changelog entry. label Nov 5, 2023
@mergify mergify bot merged commit 402212c into libp2p:master Nov 5, 2023
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-change Pull requests that make internal changes to crates and thus don't need to include a changelog entry. send-it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants