Wait for IPv4 before sending VVM requests.
Precondition to reproduce:
- Attached to a network where IPv6 arrives before IPv4
- WiFi is On
- Mobile always-on is Disabled (that's default setting)
- VVM server is IPV4 only
What happened:
- VVM sync failed with DATA_CANNOT_RESOLVE_HOST_ON_NETWORK
Root Cause:
- With above precondition, there will be >50% possibility that
when App requests Cellular Data Network, IPV6 address will be
reported a few millis before IPV4. This is causing the App to try
using IPV6 address (when IPV6 comes first) to query the VVM Server DNS
and as the VVM Server is an IPv4 one, it's possible to stabilish
a route.
Solution:
- When App requests Cellular Data Network, if IPV6 network address
arrives first, just wait up to 0.5 sec to do DNS query, so we're
sure there's enough time to IPv4 address to be available.
Bug: 183967989
Change-Id: I8af48b71ec9d6699f604a9db87bb0a77fa4379ca
3 files changed