mirror of
https://github.com/minio/minio.git
synced 2025-11-23 19:17:43 -05:00
storage: Implement Close() in REST client (#6826)
Calling /minio/prometheuses/metrics calls xlSets.StorageInfo() which creates a new storage REST client and closes it. However, currently, closing does nothing to the underlying opened http client. This commit introduces a closing behavior by calling CloseIdleConnections provided by http.Transport upon the initialization of this latter.
This commit is contained in:
committed by
Harshavardhana
parent
bfb505aa8e
commit
69bd6df464
@@ -322,6 +322,7 @@ func (client *storageRESTClient) RenameFile(srcVolume, srcPath, dstVolume, dstPa
|
||||
// Close - marks the client as closed.
|
||||
func (client *storageRESTClient) Close() error {
|
||||
client.connected = false
|
||||
client.restClient.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user