Skip to content

Commit 9d66ce3

Browse files
Increase MaxIdleConnsPerHost in http.Transport
1 parent 1e93d84 commit 9d66ce3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

gitlab/config.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ func (c *Config) Client() (interface{}, error) {
4040
tlsConfig.InsecureSkipVerify = true
4141
}
4242

43-
t := &http.Transport{
44-
Proxy: http.ProxyFromEnvironment,
45-
TLSClientConfig: tlsConfig,
46-
}
43+
t := http.DefaultTransport.(*http.Transport).Clone()
44+
t.TLSClientConfig = tlsConfig
45+
t.MaxIdleConnsPerHost = 100
4746

4847
opts := []gitlab.ClientOptionFunc{
4948
gitlab.WithHTTPClient(

0 commit comments

Comments
 (0)