diff options
Diffstat (limited to 'android')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/service/LocationInfoCache.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/LocationInfoCache.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/LocationInfoCache.kt index 54114bc464..6d6c1e6359 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/LocationInfoCache.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/LocationInfoCache.kt @@ -153,11 +153,13 @@ class LocationInfoCache( newLocation = executeFetch().await() } - if (newLocation != null && fetchId == fetchIdCounter) { - location = newLocation + synchronized(this@LocationInfoCache) { + if (newLocation != null && fetchId == fetchIdCounter) { + location = newLocation - if (isRealLocation) { - lastKnownRealLocation = newLocation + if (isRealLocation) { + lastKnownRealLocation = newLocation + } } } } |
