caddyhttp: Fix h3 shutdown (#5541)

* swap h3server close and listener close, avoid quic-listener not closing

* fix typo
This commit is contained in:
WeidiDeng
2023-05-20 00:00:00 +08:00
committed by GitHub
parent bd34cb6b4e
commit 29452647d8
2 changed files with 16 additions and 8 deletions

View File

@@ -555,7 +555,7 @@ func (s *Server) serveHTTP3(addr caddy.NetworkAddress, tlsCfg *tls.Config) error
}
}
s.h3listeners = append(s.h3listeners, lnAny.(net.PacketConn))
s.h3listeners = append(s.h3listeners, ln)
//nolint:errcheck
go s.h3server.ServeListener(h3ln)