From a7ed0cf69e7c193aa7c87c5aaddf1c3e45cdbd2f Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 3 Aug 2017 11:20:14 -0600 Subject: [PATCH] Avoid panic on QUIC server close (fixes #1805) --- caddyhttp/httpserver/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddyhttp/httpserver/server.go b/caddyhttp/httpserver/server.go index 626496d3..6a51aa9c 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