From fe1e3dd8b48bc756e6f89bde5c0d5904aabf523b Mon Sep 17 00:00:00 2001 From: Heinrich Koutcherouk Date: Thu, 6 Feb 2025 14:40:59 +0200 Subject: [PATCH] RED-144637 - close the connecton after issuing a request We suspect that connections are not closed properly, leading to overloading envoy and API availability issues. --- internal/sdk/sdk.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/sdk/sdk.go b/internal/sdk/sdk.go index a21d24b..ef1b893 100644 --- a/internal/sdk/sdk.go +++ b/internal/sdk/sdk.go @@ -68,6 +68,7 @@ func (c *Client) request(ctx context.Context, method string, path string, reques } req, err := http.NewRequestWithContext(ctx, method, url, requestBodyReader) + req.Close = true if err != nil { return fmt.Errorf("unable to perform request %s %s: %w", method, path, err) }