diff --git a/client.go b/client.go index 3ebb5e86..afd0b1b4 100644 --- a/client.go +++ b/client.go @@ -1203,6 +1203,9 @@ func (c *Client) startupHealthcheck(parentCtx context.Context, timeout time.Dura defer cancel() req = req.WithContext(ctx) res, err := c.c.Do(req) + if res != nil && res.Body != nil { + res.Body.Close() + } if err != nil { lastErr = err } else if res.StatusCode >= 200 && res.StatusCode < 300 {