mirror of https://github.com/minio/minio.git
Fix issue with webhook events not closing Response body, leaving connections open with remote server (#3645)
This commit is contained in:
parent
85f2b74cfd
commit
02194ee3c6
|
@ -119,6 +119,9 @@ func (n httpConn) Fire(entry *logrus.Entry) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure to close the response body so the connection can be re-used.
|
||||||
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK &&
|
if resp.StatusCode != http.StatusOK &&
|
||||||
resp.StatusCode != http.StatusAccepted &&
|
resp.StatusCode != http.StatusAccepted &&
|
||||||
resp.StatusCode != http.StatusContinue {
|
resp.StatusCode != http.StatusContinue {
|
||||||
|
|
Loading…
Reference in New Issue