Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
bugfix: fix connection leak when statuscode check is not passed
Browse files Browse the repository at this point in the history
Signed-off-by: pangsq <[email protected]>
  • Loading branch information
pangsq committed Nov 6, 2020
1 parent 731059a commit c691e3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions supernode/httpclient/origin_http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func (client *OriginClient) Download(url string, headers map[string]string, chec
if checkCode(resp.StatusCode) {
return resp, nil
}
resp.Body.Close()
return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode)
}

Expand Down

0 comments on commit c691e3f

Please sign in to comment.