fixes FD leak in RPC client

FD leak due to sockets not getting closed
on the rpc client
FIXRM #8107