fix: close res body

pull/2135/head
guangwu 2 months ago committed by GitHub
parent 56e7bd01ca
commit c1dbf105c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save