Skip to content

Commit

Permalink
RecordClient/Add: close response body
Browse files Browse the repository at this point in the history
  • Loading branch information
micvbang committed Apr 29, 2024
1 parent 4b2aa97 commit b9a2298
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (c *RecordClient) Add(topicName string, record []byte) error {
if err != nil {
return fmt.Errorf("sending request: %w", err)
}
defer res.Body.Close()

err = c.statusCode(res)
if err != nil {
Expand Down

0 comments on commit b9a2298

Please sign in to comment.