-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Expose quic server closed err #3395
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3395 +/- ##
=======================================
Coverage 85.40% 85.40%
=======================================
Files 135 135
Lines 9911 9911
=======================================
Hits 8464 8464
Misses 1065 1065
Partials 382 382
Continue to review full report at Codecov.
|
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
* 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.
* 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.
To provide a way to check whether a returned error is expected or not from
quic.Listener
andhttp3.Server
.