mcxiaoke / android-volley

DEPRECATED
4.29k stars 1.56k forks source link

Duplicated POST -request with slow request #137

Open jikun2008 opened 8 years ago

jikun2008 commented 8 years ago

Android Volley double post when have slow request. this url http://stackoverflow.com/questions/22428343/android-volley-double-post-when-have-slow-request

ibu2710 commented 7 years ago

yes facing the same issue. did you find the answer

VitaliPekelis commented 7 years ago

i have the same issue

ibu2710 commented 7 years ago

anyone found the solution

VitaliPekelis commented 7 years ago

This is work for me.

`public class MyRetryPolicyWithoutRetry implements RetryPolicy { @Override public int getCurrentTimeout() { return CONNECTION_TIME_OUT; /200000/ }

@Override
public int getCurrentRetryCount()
{
    return 0;
}

@Override
public void retry(VolleyError error) throws VolleyError
{
    throw(error);
}

}`

request.setRetryPolicy(new MyRetryPolicyWithoutRetry());

jikun2008 commented 7 years ago

3q for it i already use retrofit2

ibu2710 commented 7 years ago

VitaliPekelis where to add this...

does it solve the issue originally

I implemented this... Will it help me ... please suggest me i am in a hurry

I will be more thankful

VitaliPekelis commented 7 years ago

ibrahim-appgodz, for me it solve the issue... setRetryPolicy to your request ...

com.android.volley.Request.setRetryPolicy(new MyRetryPolicyWithoutRetry());