Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke RetryPolicy (on an opt-in basis) for NoConnectionErrors #332

Closed
rtinku opened this issue Apr 28, 2020 · 3 comments
Closed

Invoke RetryPolicy (on an opt-in basis) for NoConnectionErrors #332

rtinku opened this issue Apr 28, 2020 · 3 comments
Milestone

Comments

@rtinku
Copy link

rtinku commented Apr 28, 2020

No description provided.

@rtinku rtinku changed the title perform request retry on OnConnectionException occur how to perform request retry on OnConnectionException occur ? Apr 28, 2020
@jpd236
Copy link
Collaborator

jpd236 commented Apr 28, 2020

I'm not really sure what you're asking here. OnConnectionException isn't anything I've heard of. In general you can call Request#setRetryPolicy to provide a RetryPolicy implementation which will retry requests however you see fit.

In the future, if you have further questions, please use our user group at [email protected] if you are unable to get help via StackOverflow or other mechanisms. This is for tracking issues with Volley rather than for fielding general questions.

@jpd236 jpd236 closed this as completed Apr 28, 2020
@rtinku
Copy link
Author

rtinku commented Apr 29, 2020

I'm not really sure what you're asking here. OnConnectionException isn't anything I've heard of. In general you can call Request#setRetryPolicy to provide a RetryPolicy implementation which will retry requests however you see fit.
In the future, if you have further questions, please use our user group at [email protected] if you are unable to get help via StackOverflow or other mechanisms. This is for tracking issues with Volley rather than for fielding general questions.

sorry it's my mistake not 'OnConnectionException' , it's NoConnectionError.
I want to perform request retry on 'NoConnectionError'. if any solution is available please provide it.

@jpd236
Copy link
Collaborator

jpd236 commented Apr 29, 2020

Got it. You're right that we don't currently retry these - the assumption has been that if there's no connection available on the device, then there's no point in retrying again immediately, and you'll need to wait until a connection comes back up.

I'm open to a change in Volley to allow controlling this behavior and asking the RetryPolicy to decide what to do rather than assuming we shouldn't retry. #48 has some discussion on what a PR to fix this would look like.

@jpd236 jpd236 reopened this Apr 29, 2020
@jpd236 jpd236 changed the title how to perform request retry on OnConnectionException occur ? Invoke RetryPolicy (on an opt-in basis) for NoConnectionErrors Apr 29, 2020
@jpd236 jpd236 added this to the 1.2.0 milestone Apr 29, 2020
@jpd236 jpd236 closed this as completed in 504e41a Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants