Against version 0.2.0
with Java 8 I have run:
public static void main(String[] args) throws Exception {
String clientPk = "GBKVT7EO462QUCQVBNBWI47J6NQ6UKQUXLJOAWC7ZSIZKATMIDTK32X6";
Server server = new Server("https://horizon-testnet.stellar.org");
KeyPair destination = KeyPair.fromAccountId(clientPk);
while (true) {
try {
server.accounts().account(destination);
} catch (ErrorResponse e) {
System.out.println(e.getBody());
System.out.println("Thread.activeCount() = " + Thread.activeCount());
}
}
}
The thread count did not increase.
{
"type": "https://stellar.org/horizon-errors/not_found",
"title": "Resource Missing",
"status": 404,
"detail": "The resource at the url requested was not found. This is usually occurs for one of two reasons: The url requested is not valid, or no data in our database could be found with the parameters provided."
}
Thread.activeCount() = 4
{
"type": "https://stellar.org/horizon-errors/not_found",
"title": "Resource Missing",
"status": 404,
"detail": "The resource at the url requested was not found. This is usually occurs for one of two reasons: The url requested is not valid, or no data in our database could be found with the parameters provided."
}
Thread.activeCount() = 4
{
"type": "https://stellar.org/horizon-errors/not_found",
"title": "Resource Missing",
"status": 404,
"detail": "The resource at the url requested was not found. This is usually occurs for one of two reasons: The url requested is not valid, or no data in our database could be found with the parameters provided."
}
Thread.activeCount() = 4
... forever
I do not get an HttpResponseException
. The exception thrown is org.stellar.sdk.requests.ErrorResponse
. Perhaps you are configuring your server differently.