[XAPID-1070] reuse the same http client, change maxIdleConnsPerHost
diff --git a/init.go b/init.go index deb3630..32be608 100644 --- a/init.go +++ b/init.go
@@ -127,22 +127,12 @@ }, } apidClusterId = config.GetString(configApidClusterID) - - // initialize tracker client + client := &trackerClient{ trackerBaseUrl: configApiServerBaseURI, clusterId: apidClusterId, - httpclient: &http.Client{ - Transport: &http.Transport{ - MaxIdleConnsPerHost: maxIdleConnsPerHost, - }, - Timeout: httpTimeout, - CheckRedirect: func(req *http.Request, _ []*http.Request) error { - req.Header.Set("Authorization", getBearerToken()) - return nil - }, - }, + httpclient: httpClient, } // initialize db manager @@ -192,7 +182,6 @@ downloadQueue: make(chan *DownloadRequest, downloadQueueSize), isClosed: new(int32), client: httpClient, - } bundleMan.initializeBundleDownloading()