The new ReconnectingCordaRPCOps exposes a close method that, when called, shuts down an executor and a thread pool. However, this cannot be accessed by default, as the RPC Client returns an instance of CordaRPCOps interface and this does not implement close. As a result, the client has no way of closing these thread pools without an explicit cast.
Additionally, if the gracefulReconnection option is used and close is called on the connection (rather than the ops), then the underlying connection will be closed but the thread pools will not be. This results in threads leaking from the closed connection object.
Either the close method should be exposed through the CordaRPCOps interface, or the ReconnectingRPCConnection should also close the thread pools that the ReconnectingCordaRPCOps currently closes.