mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-19 14:08:31 -04:00
httpserver: Ignore ErrServerClosed when closing server
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user