We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. You have this example for queued interceptor.
https://github.com/flutterchina/dio/blob/a4392ff8412bfe1e3e86ae45f81fe1fc117bc56e/example/lib/queued_interceptor_crsftoken.dart
onError you are requesting new token with different Dio client called tokenDio https://github.com/flutterchina/dio/blob/a4392ff8412bfe1e3e86ae45f81fe1fc117bc56e/example/lib/queued_interceptor_crsftoken.dart#L48
onError
Dio
tokenDio
Does this mean that dio client is paused?
dio
If the main dio client is paused why do you retry the failed request with dio client https://github.com/flutterchina/dio/blob/a4392ff8412bfe1e3e86ae45f81fe1fc117bc56e/example/lib/queued_interceptor_crsftoken.dart#L53
Looks a little bit confusing.
Could you clarify why it works? Why we can do retry with the same client but have to request token with different one?
retry
The text was updated successfully, but these errors were encountered:
I am also having the same issue +1 for clarification
Sorry, something went wrong.
Agreed, we need more clarification on this. The example code actually causes dead lock, which seems a design flaw to me: #1612
No branches or pull requests
New Issue Checklist
Issue Info
Hi. You have this example for queued interceptor.
https://github.com/flutterchina/dio/blob/a4392ff8412bfe1e3e86ae45f81fe1fc117bc56e/example/lib/queued_interceptor_crsftoken.dart
Issue Description and Steps
onError
you are requesting new token with differentDio
client calledtokenDio
https://github.com/flutterchina/dio/blob/a4392ff8412bfe1e3e86ae45f81fe1fc117bc56e/example/lib/queued_interceptor_crsftoken.dart#L48
Does this mean that
dio
client is paused?If the main
dio
client is paused why do you retry the failed request withdio
clienthttps://github.com/flutterchina/dio/blob/a4392ff8412bfe1e3e86ae45f81fe1fc117bc56e/example/lib/queued_interceptor_crsftoken.dart#L53
Looks a little bit confusing.
Could you clarify why it works?
Why we can do
retry
with the same client but have to request token with different one?The text was updated successfully, but these errors were encountered: