diff --git a/http.go b/http.go index ad743d5..fb2d111 100644 --- a/http.go +++ b/http.go @@ -468,7 +468,7 @@ func (h *httpTransportListener) Accept(fn func(transport.Socket)) error { } // insecure connection use h2c - if !(h.ht.opts.Secure || h.ht.opts.TLSConfig != nil) { + if h.ht.opts.TLSConfig == nil { srv.Handler = h2c.NewHandler(mux, &http2.Server{}) }