Fix issue with webhook events not closing Response body, leaving connections open with remote server (#3645)

master
Alex Ellis 8 years ago committed by Harshavardhana
parent 85f2b74cfd
commit 02194ee3c6
  1. 3
      cmd/notify-webhook.go

@ -119,6 +119,9 @@ func (n httpConn) Fire(entry *logrus.Entry) error {
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 &&
resp.StatusCode != http.StatusAccepted &&
resp.StatusCode != http.StatusContinue {

Loading…
Cancel
Save