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 <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2024-03-13 12:57:25 +03:00
parent 54c53cf6ca
commit 86faf7b343

View file

@ -3464,6 +3464,7 @@ func doRPCCallOverHTTP(rpcCall string, url string, t *testing.T) []byte {
body, err := gio.ReadAll(resp.Body) body, err := gio.ReadAll(resp.Body)
resp.Body.Close() resp.Body.Close()
assert.NoErrorf(t, err, "could not read response from the request: %s", rpcCall) assert.NoErrorf(t, err, "could not read response from the request: %s", rpcCall)
cl.CloseIdleConnections()
return bytes.TrimSpace(body) return bytes.TrimSpace(body)
} }