Merge pull request #641 from testwill/close_body

fix: close resp body
This commit is contained in:
Muneeb Aijaz
2024-04-24 14:44:28 +05:00
committed by GitHub

View File

@@ -133,6 +133,7 @@ func sendWebhook(url string) (string, []error) {
// the reloader seems to retry automatically so no retry logic added
return "", err
}
defer resp.Body.Close()
var buffer bytes.Buffer
_, bufferErr := io.Copy(&buffer, resp.Body)
if bufferErr != nil {