-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
On network change (e.g. wifi -> cellular) okhttp on android fails to connect to a reachable endpoint #4789
Comments
Test Code: A button in test app triggers this code
|
Our app has the same problem |
|
parser gslb dns exception:java.net.UnknownHostException: Unable to resolve host |
This issue is still present... Is there any workaround at least? |
I suspect related to #3278 |
We see this issue in our app too. Any solution or workaround for this ? |
@sharun Do you have any updates here ? I see mainly in Android 13 Samsung/Huawei devices. |
Based on the caching in Android, I'm going to close this. https://cs.android.com/android/platform/superproject/main/+/main:libcore/ojluni/src/main/java/java/net/Inet6AddressImpl.java Results are cached for 2 seconds, and the DNS.System is network unaware. You can implement a custom DNS pinning to a network, but we haven't currently done that. wireless.cingular.com is being configured as a proxy which is why you are seeing it in your results. |
okhttp:3.12.1
okio:1.16.0
OkHttpClient
), then it breaks out of these failures and starts working againeverything seem to be working fine, I just disabled wifi here, so underlying active network will be cellular network:
it failed here and keeps failing for a while
Here is the fix part:
still failing
I launched another thread
30296 20313
, due to which last-but-one call on the extant thread works:this is the actual new thread (but as you can see from logs just above, things seem to have fixed
Question/Notes:
The text was updated successfully, but these errors were encountered: