We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67a0b6e commit 2847d88Copy full SHA for 2847d88
internal/api.go
@@ -49,11 +49,7 @@ var (
49
// http.DefaultTransport with a TLS Client Session Cache, to enable TLS session
50
// resumption.
51
func NewDefaultTransportWithResumption() *http.Transport {
52
- t, ok := http.DefaultTransport.(*http.Transport)
53
- if !ok {
54
- panic("cannot assert DefaultTranport to *Transport")
55
- }
56
-
+ t := http.DefaultTransport.(*http.Transport).Clone()
57
t.TLSClientConfig = &tls.Config{
58
ClientSessionCache: tls.NewLRUClientSessionCache(1),
59
}
0 commit comments