diff --git a/caddyhttp/httpserver/server.go b/caddyhttp/httpserver/server.go index 626496d31..6a51aa9c0 100644 --- a/caddyhttp/httpserver/server.go +++ b/caddyhttp/httpserver/server.go @@ -305,7 +305,7 @@ func (s *Server) Serve(ln net.Listener) error { } err := s.Server.Serve(ln) - if QUIC { + if s.quicServer != nil { s.quicServer.Close() } return err