From 21169a48f79ba3d92565dac73feb32b2c6c54ccf Mon Sep 17 00:00:00 2001 From: guangwu Date: Sat, 18 May 2024 22:08:52 +0800 Subject: [PATCH] fix: close resp body --- hipchat/hipchat.go | 1 + 1 file changed, 1 insertion(+) diff --git a/hipchat/hipchat.go b/hipchat/hipchat.go index 1aec48d..6920a93 100644 --- a/hipchat/hipchat.go +++ b/hipchat/hipchat.go @@ -57,6 +57,7 @@ func (h *HipchatClient) Notify(msg, color string) error { log.Printf("Could not post to hipchat for the reason %s", err.Error()) return err } + defer resp.Body.Close() _, err = ioutil.ReadAll(resp.Body) if err != nil {