diff --git a/src/chartserver/client.go b/src/chartserver/client.go index 1ab153570..a304c952a 100644 --- a/src/chartserver/client.go +++ b/src/chartserver/client.go @@ -31,12 +31,12 @@ type ChartClient struct { // NewChartClient is constructor of ChartClient // credential can be nil func NewChartClient(credential *Credential) *ChartClient { // Create http client with customized timeouts + tr := commonhttp.GetHTTPTransport(commonhttp.InternalTransport) + tr.MaxIdleConns = maxIdleConnections + tr.IdleConnTimeout = idleConnectionTimeout client := &http.Client{ - Timeout: clientTimeout, - Transport: &http.Transport{ - MaxIdleConns: maxIdleConnections, - IdleConnTimeout: idleConnectionTimeout, - }, + Timeout: clientTimeout, + Transport: tr, } return &ChartClient{