Commit 6a1f9ca2 authored by Ethen Pociask's avatar Ethen Pociask

[indexer.client] Close response body

parent 1ca98c02
...@@ -51,6 +51,10 @@ func (c *Client) HealthCheck() error { ...@@ -51,6 +51,10 @@ func (c *Client) HealthCheck() error {
return err return err
} }
defer func() {
_ = resp.Body.Close()
}()
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
return fmt.Errorf("health check failed with status code %d", resp.StatusCode) return fmt.Errorf("health check failed with status code %d", resp.StatusCode)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment