diff options
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/helper/helper.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bridge/helper/helper.go b/bridge/helper/helper.go index bfa9e64b..9522823b 100644 --- a/bridge/helper/helper.go +++ b/bridge/helper/helper.go @@ -20,9 +20,9 @@ func DownloadFile(url string) (*[]byte, error) { } resp, err := client.Do(req) if err != nil { - resp.Body.Close() return nil, err } + defer resp.Body.Close() io.Copy(&buf, resp.Body) data := buf.Bytes() resp.Body.Close() |