diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-08-24 00:32:44 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-08-24 00:32:44 -0700 |
| commit | 5f55a87101f727ff7fdd6f53f6ea14728c3399a6 (patch) | |
| tree | 7c18df8abdfa81ba0a1835f073c708bef76875fe /weed/util | |
| parent | 0b301b0b4786c9ae1fd82e84badf1487f8ce08a4 (diff) | |
| download | seaweedfs-5f55a87101f727ff7fdd6f53f6ea14728c3399a6.tar.xz seaweedfs-5f55a87101f727ff7fdd6f53f6ea14728c3399a6.zip | |
close http response
Diffstat (limited to 'weed/util')
| -rw-r--r-- | weed/util/http_util.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/weed/util/http_util.go b/weed/util/http_util.go index 5159fcd17..7cc64ea85 100644 --- a/weed/util/http_util.go +++ b/weed/util/http_util.go @@ -368,6 +368,7 @@ 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) } |
