Drop the RPC connection used in TestNode.wait_for_rpc_connection
if --usecli
is set. If the connection is kept and not used the Connection: close
header is never sent and so the connection only closes due to timeout (30 sec).
It might be sensible to revert e98a9eede2fb48ff33a020acc888cbcd83e24bbf in a follow up, however it changes the shutdown behavior.