mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-07-04 16:16:58 +02:00
s3: do not close reader too early
fix https://github.com/chrislusf/seaweedfs/issues/1609
This commit is contained in:
parent
15956d8a8e
commit
73f934d5de
|
@ -370,7 +370,6 @@ func ReadUrlAsReaderCloser(fileUrl string, rangeHeader string) (io.ReadCloser, e
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer CloseResponse(r)
|
|
||||||
if r.StatusCode >= 400 {
|
if r.StatusCode >= 400 {
|
||||||
return nil, fmt.Errorf("%s: %s", fileUrl, r.Status)
|
return nil, fmt.Errorf("%s: %s", fileUrl, r.Status)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue