Skip to content

Commit

Permalink
http3.Server's serving method returns http.ErrServerClosed when quic …
Browse files Browse the repository at this point in the history
…listener is closed
  • Loading branch information
hareku committed Apr 25, 2022
1 parent be25784 commit fb1f244
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http3/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
return err
}
go s.handleConn(conn)
Expand Down

0 comments on commit fb1f244

Please sign in to comment.