httpserver: Ignore ErrServerClosed when closing server

This commit is contained in:
Matthew Holt
2018-04-02 08:17:21 -06:00
parent b33b24fc9e
commit 917a604094
2 changed files with 4 additions and 1 deletions

View File

@@ -319,6 +319,9 @@ func (s *Server) Serve(ln net.Listener) error {
}
err := s.Server.Serve(ln)
if err == http.ErrServerClosed {
err = nil // not an error worth reporting since closing a server is intentional
}
if s.quicServer != nil {
s.quicServer.Close()
}