Skip to content

Commit

Permalink
Update managedidentity.go
Browse files Browse the repository at this point in the history
Removed the condition and copied no matter the body size.
  • Loading branch information
4gust committed Nov 6, 2024
1 parent 31fc7a0 commit 54ff161
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/managedidentity/managedidentity.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,9 @@ func retry(maxRetries int, c ops.HTTPClient, req *http.Request) (*http.Response,
if attempt == maxRetries-1 {
return resp, err
}
if resp != nil && resp.Body != nil {
io.Copy(io.Discard, resp.Body)
resp.Body.Close()
}
io.Copy(io.Discard, resp.Body)
resp.Body.Close()

delay := time.Duration(time.Second)
time.Sleep(delay)
}
Expand Down

0 comments on commit 54ff161

Please sign in to comment.