Skip to content

Commit

Permalink
Remove body.Close on passed in *http.Response:
Browse files Browse the repository at this point in the history
Let the caller handle the close.

Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed Sep 11, 2023
1 parent 588de30 commit 7c6461a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion providers/rpc/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func (p *Provider) handleResponse(resp *http.Response, reqKeysAndValues []interf
p.Logger.Info("rpc notification details", kvs...)
}
}()
defer resp.Body.Close()
bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
return ResponsePayload{}, fmt.Errorf("failed to read response body: %v", err)
Expand Down

0 comments on commit 7c6461a

Please sign in to comment.