make Config.Allow0RTT a bool, not a callback

This commit is contained in:
Marten Seemann 2023-03-22 13:25:09 +13:00
parent bc7cb706c5
commit 7a0ef5f867
10 changed files with 35 additions and 49 deletions

View file

@ -288,7 +288,7 @@ func (s *Server) serveConn(tlsConf *tls.Config, conn net.PacketConn) error {
baseConf := ConfigureTLSConfig(tlsConf)
quicConf := s.QuicConfig
if quicConf == nil {
quicConf = &quic.Config{Allow0RTT: func(net.Addr) bool { return true }}
quicConf = &quic.Config{Allow0RTT: true}
} else {
quicConf = s.QuicConfig.Clone()
}