File tree 1 file changed +7
-3
lines changed
android/lib/talpid/src/main/kotlin/net/mullvad/talpid
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,13 @@ class ConnectivityListener(
51
51
hasInternetCapability: Boolean ->
52
52
if (hasInternetCapability) {
53
53
ConnectionStatus (
54
- IPAvailabilityUtils .isIPv4Available(protect = { protect(it) }),
55
- IPAvailabilityUtils .isIPv6Available(protect = { protect(it) }),
56
- )
54
+ IPAvailabilityUtils .isIPv4Available(protect = { protect(it) }),
55
+ IPAvailabilityUtils .isIPv6Available(protect = { protect(it) }),
56
+ )
57
+ // If we have internet, but both IPv4 and IPv6 are not available, we
58
+ // assume something is wrong and instead
59
+ // will return both as available since this is the previous behavior.
60
+ .takeUnless { ! it.ipv4 && ! it.ipv6 } ? : ConnectionStatus (true , true )
57
61
} else {
58
62
ConnectionStatus (false , false )
59
63
}
You can’t perform that action at this time.
0 commit comments