Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loopj's AsyncHttpclient not setting the correct timeout

I tried setting my asynchttpclient's timeout in my singleton class but it seems that it doesn't change. I got the 10000 which I think is the default value.

client.setMaxRetriesAndTimeout(0,5000);
Log.i("loopj", ""+ client.getTimeout());

EDIT:

client.setTimeout(5000);

this method is working but for the information, how come setMaxRetriesAndTimeout doesn't?

like image 540
dgzz Avatar asked Dec 31 '13 07:12

dgzz


1 Answers

Okay, I got it. From the docs,

setMaxRetriesAndTimeout - sets the maximum retries and timeout between those retries

setTimeout - sets the connect/socket timeout - this one is the 10s by default

like image 86
dgzz Avatar answered Oct 31 '22 07:10

dgzz