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