In the simplest case, when I have a KeyPair key for an account that doesn't yet exist, and call
// private Server mServer; // declared and intialized elsewhere
mServer.accounts().account(key);
it throws an HttpResponseException, but each time it runs, the system's thread count (returned by Thread.activeCount()) goes up by 2. I've tried modifying handleResponse() (in org.stellar.sdk.requests.ResponseHandler.java) to call close() on the response before throwing, but to no avail.
Is there some way I can free those threads after the exception's thrown, or does the OkHttp client code in the SDK need to be changed?