mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
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:
parent
54c53cf6ca
commit
86faf7b343
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue