From 86faf7b3437b32c0fdc3850823dabbdff5727861 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 13 Mar 2024 12:57:25 +0300 Subject: [PATCH] rpcsrv: close idle client connections in doRPCCallOverHTTP Shouldn't affect things much, yet at the same time we no longer need any connection after we're done with the request. Signed-off-by: Roman Khimov --- pkg/services/rpcsrv/server_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/services/rpcsrv/server_test.go b/pkg/services/rpcsrv/server_test.go index 23a6f52ec..c0b0fe151 100644 --- a/pkg/services/rpcsrv/server_test.go +++ b/pkg/services/rpcsrv/server_test.go @@ -3464,6 +3464,7 @@ func doRPCCallOverHTTP(rpcCall string, url string, t *testing.T) []byte { body, err := gio.ReadAll(resp.Body) resp.Body.Close() assert.NoErrorf(t, err, "could not read response from the request: %s", rpcCall) + cl.CloseIdleConnections() return bytes.TrimSpace(body) }