Open mamatagelanee07 opened 9 years ago
/** The default socket timeout in milliseconds */
public static final int DEFAULT_TIMEOUT_MS = 2500;
/** The default number of retries */
public static final int DEFAULT_MAX_RETRIES = 1;
/** The default backoff multiplier */
public static final float DEFAULT_BACKOFF_MULT = 1f;
try it like this below: request.setRetryPolicy(new DefaultRetryPolicy(60000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
Hello,
Please read below question on stackoverflow carefully : http://goo.gl/F8d049
I have already tried solution you suggested. And again issue is if i set timeout to 120 seconds, then why volley throwing timeout before 120 seconds ?
Thanks for Reply.
I set retryPolicy before add(request) ,and findits useful for my Android application ,Im really want to help u more but I dont know Volley well,but I find something at a blog in my country that maybe useful for your problem:
Timeout - Specifies Socket Timeout in millis per every retry attempt. Number Of Retries - Number of times retry is attempted. Back Off Multiplier - A multiplier which is used to determine exponential time set to socket for every retry attempt. For ex. If RetryPolicy is created with these values
Timeout - 3000 secs, Num of Attempt - 2, Back Off Multiplier - 2 Attempt 1:
time = time + (time * Back Off Multiplier ); time = 3000 + 6000 = 9000 Socket Timeout = time; Request dispatched with Socket Timeout of 9 Secs Attempt 2:
time = time + (time * Back Off Multiplier ); time = 9000 + 18000 = 27000 Socket Timeout = time; Request dispatched with Socket Timeout of 27 Secs
PS:I am not good at En,Hope 你能解决你的疑问(实在不会了 :))
Hi fairytale2016,
Issue not solved but thanks for your help.
no 3Q :)
Hello,
In my application I have set
RetryPolicy
like below :So here timeout is already set to 120000 milliseocnds means '2 minutes' but in my android application volley throws
TimeoutError
indeliverResponse
method of custom request before timeout (2 minutes) andresponse
containstimeout
variable with value of 5234ms.So how volley gets timeout before actual timeout?
Please refer this link below for more information about custom request I have created : http://goo.gl/F8d049
Thanks.