Remove body close
This commit is contained in:
@@ -181,9 +181,6 @@ func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
|
||||
attempt := 0
|
||||
for {
|
||||
resp, err = r.client.Do(req)
|
||||
if err != nil {
|
||||
defer resp.Body.Close()
|
||||
}
|
||||
if resp != nil && (resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent) {
|
||||
body, _ := io.ReadAll(resp.Body)
|
||||
if body != nil {
|
||||
|
||||
Reference in New Issue
Block a user