From 733f4c71b8e5825cb55a372a1d015d36ae8457db Mon Sep 17 00:00:00 2001 From: guangwu Date: Fri, 24 May 2024 05:53:27 +0800 Subject: [PATCH] Close res body (rocketchat) (#2135) --- bridge/rocketchat/helpers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bridge/rocketchat/helpers.go b/bridge/rocketchat/helpers.go index 936f631c..1dbcab09 100644 --- a/bridge/rocketchat/helpers.go +++ b/bridge/rocketchat/helpers.go @@ -135,6 +135,7 @@ func (b *Brocketchat) uploadFile(fi *config.FileInfo, channel string) error { if err != nil { return err } + defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return err