Fix: close http Response body on provider (#1154)

This commit is contained in:
Keyi Xie
2020-12-29 11:28:22 +08:00
committed by GitHub
parent 09c28e0355
commit 02d029dd2d
3 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,7 @@ func (h *HTTPVehicle) Read() ([]byte, error) {
if err != nil {
return nil, err
}
defer resp.Body.Close()
buf, err := ioutil.ReadAll(resp.Body)
if err != nil {