From 73f934d5de99a7faf8b7160126593b508c5b5da2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 11 Nov 2020 01:49:39 -0800 Subject: [PATCH] s3: do not close reader too early fix https://github.com/chrislusf/seaweedfs/issues/1609 --- weed/util/http_util.go | 1 - 1 file changed, 1 deletion(-) diff --git a/weed/util/http_util.go b/weed/util/http_util.go index da0b3d849..48823c1c3 100644 --- a/weed/util/http_util.go +++ b/weed/util/http_util.go @@ -370,7 +370,6 @@ func ReadUrlAsReaderCloser(fileUrl string, rangeHeader string) (io.ReadCloser, e if err != nil { return nil, err } - defer CloseResponse(r) if r.StatusCode >= 400 { return nil, fmt.Errorf("%s: %s", fileUrl, r.Status) }