Skip to content

Commit

Permalink
fix: close res body
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
  • Loading branch information
testwill committed Mar 29, 2024
1 parent 8d5dcdf commit 3f14731
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gateway/metrics/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func (e *Exporter) getFunctions(endpointURL url.URL, namespace string) ([]types.
if err != nil {
return services, err
}
defer res.Body.Close()

bytesOut, readErr := io.ReadAll(res.Body)
if readErr != nil {
Expand Down

0 comments on commit 3f14731

Please sign in to comment.