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

http3: fix channel size in ListenAndServe #4219

Merged
merged 2 commits into from
Dec 29, 2023

Conversation

narqo
Copy link
Contributor

@narqo narqo commented Dec 28, 2023

This PR addresses two small issues in the ListenAndServe function:

  1. I believe there is a typo in the functin's docs.
  2. If an internal listener from one of the goroutines returns on an error, its peer's gorotine will leak on sending to a channel. This PR addresses this by making the channels buffered.

Also, partially prevent a goroutine leak on an error from one of the
listeners.
Copy link
Member

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

The code fix is correct, but please revert the incorrect documentation change.

http3/server.go Show resolved Hide resolved
http3/server.go Outdated Show resolved Hide resolved
@marten-seemann marten-seemann changed the title http3: typo in ListenAndServe docs http3: fix channel size in ListenAndServe Dec 29, 2023
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (22411e1) 83.95% compared to head (edf4b27) 83.95%.

Files Patch % Lines
http3/server.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4219   +/-   ##
=======================================
  Coverage   83.95%   83.95%           
=======================================
  Files         149      149           
  Lines       15405    15405           
=======================================
  Hits        12933    12933           
  Misses       1973     1973           
  Partials      499      499           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marten-seemann marten-seemann merged commit a937959 into quic-go:master Dec 29, 2023
19 checks passed
nanokatze pushed a commit to nanokatze/quic-go that referenced this pull request Feb 1, 2024
* http3: typo in ListenAndServe docs

Also, partially prevent a goroutine leak on an error from one of the
listeners.

* http3: improve documentation for ListenAndServe

---------

Co-authored-by: Marten Seemann <[email protected]>
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.

None yet

2 participants