mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-04 14:58:47 +00:00
httpserver: Ignore ErrServerClosed when closing server
This commit is contained in:
parent
b33b24fc9e
commit
917a604094
2 changed files with 4 additions and 1 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue