diff --git a/http3/server.go b/http3/server.go index 3897bbb9ffb..29357f77f52 100644 --- a/http3/server.go +++ b/http3/server.go @@ -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)