I'm trying to use the odata4j library in a mobile Android app. Sometimes a HTTP request doesn't get a response because the device lost it's mobile connection just after sending the request. After a few attempts to reproduce it and timing it, I noticed it takes roughly 27 minutes for the library to throw a "java.net.SocketException: Connection timed out". Is there any way to reduce this timeout, so I can take care and handle the failure more quickly? Thanks.
Use the jersey consumer implementation (which is the default). Add a JerseyClientBehavior [1] when you construct your consumer. This allows you to modify the ClientConfig [2] - you can modify both the connect + read timeout.