aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/GeofenceManager.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/database/GeofenceManager.java b/src/org/traccar/database/GeofenceManager.java
index 2994920d9..930008082 100644
--- a/src/org/traccar/database/GeofenceManager.java
+++ b/src/org/traccar/database/GeofenceManager.java
@@ -170,6 +170,7 @@ public class GeofenceManager {
Collection<DeviceGeofence> databaseDeviceGeofences = dataManager.getDeviceGeofences();
Collection<Device> allDevices = Context.getDeviceManager().getAllDevices();
+ groupGeofencesLock.readLock().lock();
deviceGeofencesLock.writeLock().lock();
try {
deviceGeofences.clear();
@@ -214,6 +215,7 @@ public class GeofenceManager {
} finally {
deviceGeofencesLock.writeLock().unlock();
+ groupGeofencesLock.readLock().unlock();
}
} catch (SQLException error) {