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

Expose quic server closed err #3395

Merged
merged 3 commits into from
Apr 25, 2022

Conversation

hareku
Copy link
Contributor

@hareku hareku commented Apr 25, 2022

To provide a way to check whether a returned error is expected or not from quic.Listener and http3.Server.

@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #3395 (7bc60e4) into master (1a0d577) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3395   +/-   ##
=======================================
  Coverage   85.40%   85.40%           
=======================================
  Files         135      135           
  Lines        9911     9911           
=======================================
  Hits         8464     8464           
  Misses       1065     1065           
  Partials      382      382           
Impacted Files Coverage Δ
server.go 80.46% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a0d577...7bc60e4. Read the comment docs.

http3/server.go Outdated
@@ -255,6 +255,9 @@ func (s *Server) serveImpl(startListener func() (quic.EarlyListener, error)) err
for {
conn, err := ln.Accept(context.Background())
if err != nil {
if errors.Is(err, quic.ErrServerClosed) {
return http.ErrServerClosed
Copy link
Member

Choose a reason for hiding this comment

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

Why do you convert to the http.ErrServerClosed here? The HTTP server might not be closed at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's right. I reverted it, and there is no particular need to convert in order to reach the goal of this PR.

…en quic listener is closed"

This reverts commit fb1f244.
@marten-seemann marten-seemann merged commit 823c609 into quic-go:master Apr 25, 2022
@hareku hareku deleted the expose-quic-server-closed-err branch April 25, 2022 10:11
nmldiegues pushed a commit to chungthuang/quic-go that referenced this pull request Jun 6, 2022
* expose quic server closed error

* http3.Server's serving method returns http.ErrServerClosed when quic listener is closed

* Revert "http3.Server's serving method returns http.ErrServerClosed when quic listener is closed"

This reverts commit fb1f244.
@MarcoPolo MarcoPolo mentioned this pull request Jul 7, 2022
41 tasks
sudarshan-reddy pushed a commit to sudarshan-reddy/quic-go that referenced this pull request Aug 9, 2022
* expose quic server closed error

* http3.Server's serving method returns http.ErrServerClosed when quic listener is closed

* Revert "http3.Server's serving method returns http.ErrServerClosed when quic listener is closed"

This reverts commit fb1f244.
@ajnavarro ajnavarro mentioned this pull request Aug 24, 2022
72 tasks
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.

2 participants