Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/net/http2: ConfigureTransport does not set h2transport on the http.Transport #22891
If the TLSClientConfig field of http.Transport is not set, then the HTTP package creates a default one with the following function that enables HTTP2:
However, if it is set and HTTP2 is enabled, then because of the following lines:
The h2transport field of the http.Transport will never be set and so the CloseIdleConnections method of http.Transport will never close http2 connections.
What this means is that setting a custom TLS client config and not setting one does not allow the same range of functionality. I think this is a bug because using a custom HTTP2 enabled TLSClientConfig should be just as capable as not setting one.