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(quic): don't report error for gracefully closed connections #4621

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

jxs
Copy link
Member

@jxs jxs commented Oct 10, 2023

Description

Closes quinn's Endpoint with Ok(()) when Accept returns None.

Resolves: #4588.
Related: quinn-rs/quinn#1676.

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

instead of Err(Error::EndpointDriverCrashed) when Accept
returns None. Addresses libp2p#4588
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 following this all the way through. Much appreciated.

Small suggestions for the changelog entry. Otherwise this looks good to me.

transports/quic/CHANGELOG.md Outdated Show resolved Hide resolved
@thomaseizinger thomaseizinger changed the title fix(quic): close quinn's Endpoint with Ok(()) fix(quic): don't report error for gracefully closed connections Oct 10, 2023
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.

Thanks @jxs!

@mergify mergify bot merged commit 497f393 into libp2p:master Oct 12, 2023
73 checks passed
@jxs
Copy link
Member Author

jxs commented Oct 12, 2023

bors bot pushed a commit to sigp/lighthouse that referenced this pull request Oct 18, 2023
## Issue Addressed

Since adding Quic support on #4577, and due to `quinn`s api nature LH now triggers the [`ListenerClosed`](https://docs.rs/libp2p/0.52.3/libp2p/swarm/struct.ListenerClosed.html) event.. @michaelsproul noticed we are logging this event as `crit!` independently of the reason. This PR matches the reason, logging with `debug!` and `error!` (instead of `crit!`) according to its `Result`  
## Additional Info
LH will still log `crit!` until libp2p/rust-libp2p#4621 has been merged
Gua00va pushed a commit to Gua00va/lighthouse that referenced this pull request Oct 18, 2023
## Issue Addressed

Since adding Quic support on sigp#4577, and due to `quinn`s api nature LH now triggers the [`ListenerClosed`](https://docs.rs/libp2p/0.52.3/libp2p/swarm/struct.ListenerClosed.html) event.. @michaelsproul noticed we are logging this event as `crit!` independently of the reason. This PR matches the reason, logging with `debug!` and `error!` (instead of `crit!`) according to its `Result`  
## Additional Info
LH will still log `crit!` until libp2p/rust-libp2p#4621 has been merged
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.

quic: returning ListenerClosed on connection closed internally
3 participants