Skip to content

Commit

Permalink
close body after request
Browse files Browse the repository at this point in the history
  • Loading branch information
Achooo committed Apr 24, 2023
1 parent d8583cc commit d33e4c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions agent/hcp/client/metrics_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func (o *otlpClient) ExportMetrics(ctx context.Context, protoMetrics *metricpb.R
if err != nil {
return fmt.Errorf("failed to export metrics: %v", err)
}
defer resp.Body.Close()

var respData bytes.Buffer
if _, err := io.Copy(&respData, resp.Body); err != nil {
Expand Down

0 comments on commit d33e4c3

Please sign in to comment.