Close res body (rocketchat) (#2135)

This commit is contained in:
guangwu 2024-05-24 05:53:27 +08:00 committed by GitHub
parent 70e8c6e9d3
commit 733f4c71b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,6 +135,7 @@ func (b *Brocketchat) uploadFile(fi *config.FileInfo, channel string) error {
if err != nil { if err != nil {
return err return err
} }
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) body, err := ioutil.ReadAll(resp.Body)
if err != nil { if err != nil {
return err return err