Reputation: 24651
My application performs a HTTP long-poll to another server in a loop using Jersey. It relies on the server to return within 30 seconds. The problem is that sometimes the server dies and is replaced by a different one at a different IP address. This causes the last HTTP call to never return and never timeout, so the polling loop in my application is stuck until I reboot my application.
How can I force my application to either interrupt the HTTP call or to detect that the server is gone? It is a Java application using a Jersey client.
Upvotes: 0
Views: 500