Skip to content

Commit

Permalink
Fix body closing format for CI (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdavid authored Dec 4, 2024
1 parent ae7a9c0 commit 4fdbf71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/src/gateway_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ func benchmarkEndpointHTTP(client *http.Client, url string) time.Duration {
fmt.Printf("Error calling %s: %v\n", url, err)
return 0
}
defer func(body io.ReadCloser) {
err := body.Close()
defer func() {
err := resp.Body.Close()
if err != nil {
fmt.Printf("Error closing response body: %v\n", err)
}
}(resp.Body)
}()

_, err = io.ReadAll(resp.Body)
if err != nil {
Expand Down

0 comments on commit 4fdbf71

Please sign in to comment.