I'm testing a query on Parse using the findInBackground()
method under different connection types.
When connection is not available, there are times in which the done()
callback returns, as expected, the following exception after few seconds:
com.parse.ParseException: i/o failure: org.apache.http.conn.HttpHostConnectException: Connection to https://api.parse.com refused
But there are times in which it takes like 30-60 seconds to be thrown, or even is not called at all.
Is there a way to control this behavior? I would like to set a fixed timeout, like 10 seconds.