mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
Drain response body properly for http connection pool (#6415)
Currently Go http connection pool was not being properly utilized leading to degrading performance as the number of concurrent requests increased. As recommended by Go implementation, we have to drain the response body and close it.
This commit is contained in:
@@ -85,7 +85,7 @@ func (adm *AdminClient) GetConfig() ([]byte, error) {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, httpRespToErrorResponse(resp)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer closeResponse(resp)
|
||||
|
||||
return DecryptServerConfigData(adm.secretAccessKey, resp.Body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user