add methods to close rpc clients