-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[IOS] interceptor onError is not triggered only when losing connectivity #426
Comments
I have encountered a similar problem to you.
|
in adapter.dart. await request.addStream(requestStream).timeout(Duration(milliseconds:options.connectTimeout)); HttpClientResponse responseStream = await request.close().timeout(Duration(milliseconds:options.connectTimeout)); ^^^ it helps on iOS to finally start getting connect timeouts |
I ended up adding a timeout but still users with disconnected network will have to wait for the timeout to finish before getting an error. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
Still facing this issue. |
New Issue Checklist
Issue Info
Issue Description and Steps
Issue is that the interceptor onError doesn't trigger in IOS in the following scenario:
Interceptor onRequest, onResponse, and onError normally work with regular scenarios on all platforms, but in IOS onError is not triggered only when losing connectivity after sending the request.
Interceptor is setup like this:
I tried placing breakpoints in all catch statements in dio library but none fire on losing connection.
The text was updated successfully, but these errors were encountered: