fix: close res body

This commit is contained in:
guangwu
2024-04-22 18:06:02 +08:00
committed by GitHub
parent 56e7bd01ca
commit c1dbf105c3

View File

@@ -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