Skip to content

fix(quic): don't report error for gracefully closed connections#4621

Merged
mergify[bot] merged 5 commits intolibp2p:masterfrom
jxs:quic-listener-closed
Oct 12, 2023
Merged

fix(quic): don't report error for gracefully closed connections#4621
mergify[bot] merged 5 commits intolibp2p:masterfrom
jxs:quic-listener-closed

Conversation

@jxs
Copy link
Copy Markdown
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

jxs added 2 commits October 6, 2023 09:51
instead of Err(Error::EndpointDriverCrashed) when Accept
returns None. Addresses libp2p#4588
Copy link
Copy Markdown
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.

@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
Copy Markdown
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
@jxs
Copy link
Copy Markdown
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