mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
fix: close and drain the response body always (#8847)
This commit is contained in:
@@ -251,6 +251,7 @@ func parseDiscoveryDoc(u *xnet.URL, transport *http.Transport, closeRespFn func(
|
||||
}
|
||||
resp, err := clnt.Do(req)
|
||||
if err != nil {
|
||||
clnt.CloseIdleConnections()
|
||||
return d, err
|
||||
}
|
||||
defer closeRespFn(resp.Body)
|
||||
|
||||
Reference in New Issue
Block a user