no need to close the body again

Both of these 'res' vars come from functions that call decodeApiResponse(). It
already closes the response, releasing the http connection back to the pool.
This commit is contained in:
risk danger olson 2015-11-06 10:05:44 -08:00
parent bacc69fe7c
commit 1833fa8d15

@ -182,9 +182,6 @@ func DownloadCheck(oid string) (*objectResource, error) {
return nil, Error(err)
}
io.Copy(ioutil.Discard, res.Body)
res.Body.Close()
return obj, nil
}
@ -233,8 +230,6 @@ func Batch(objects []*objectResource, operation string) ([]*objectResource, erro
res, objs, err := doApiBatchRequest(req)
io.Copy(ioutil.Discard, res.Body)
res.Body.Close()
if err != nil {
if res == nil {