From 9c8cdeda570338c35cf231d7894ed43b3c09ac16 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 25 Mar 2022 13:21:33 +0100 Subject: [PATCH] allow HTTP clients to set the number of incoming streams in quic.Config --- http3/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/http3/client.go b/http3/client.go index f85d8d559..dcf57795b 100644 --- a/http3/client.go +++ b/http3/client.go @@ -76,7 +76,9 @@ func newClient(hostname string, tlsConf *tls.Config, opts *roundTripperOpts, con if len(conf.Versions) != 1 { return nil, errors.New("can only use a single QUIC version for dialing a HTTP/3 connection") } - conf.MaxIncomingStreams = -1 // don't allow any bidirectional streams + if conf.MaxIncomingStreams == 0 { + conf.MaxIncomingStreams = -1 // don't allow any bidirectional streams + } conf.EnableDatagrams = opts.EnableDatagram logger := utils.DefaultLogger.WithPrefix("h3 client")