diff options
author | Abyss777 <abyss@fox5.ru> | 2016-07-21 17:44:57 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-07-21 17:44:57 +0500 |
commit | e269c81b1b8044d051196e97f0884935c153feb0 (patch) | |
tree | 4162d2058c873860d58745e43c91c3dd86becb81 | |
parent | 35eea73b2b9e381efd5da60662f0f64f59b91406 (diff) | |
download | traccar-server-e269c81b1b8044d051196e97f0884935c153feb0.tar.gz traccar-server-e269c81b1b8044d051196e97f0884935c153feb0.tar.bz2 traccar-server-e269c81b1b8044d051196e97f0884935c153feb0.zip |
Added parentheses
-rw-r--r-- | src/org/traccar/database/DeviceManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java index f442dfb19..4dd7b41cb 100644 --- a/src/org/traccar/database/DeviceManager.java +++ b/src/org/traccar/database/DeviceManager.java @@ -70,7 +70,7 @@ public class DeviceManager implements IdentityManager { private void updateDeviceCache(boolean force) throws SQLException { long lastUpdate = devicesLastUpdate.get(); - if (force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay + if ((force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay) && devicesLastUpdate.compareAndSet(lastUpdate, System.currentTimeMillis())) { GeofenceManager geofenceManager = Context.getGeofenceManager(); Collection<Device> databaseDevices = dataManager.getAllDevices(); @@ -233,7 +233,7 @@ public class DeviceManager implements IdentityManager { private void updateGroupCache(boolean force) throws SQLException { long lastUpdate = groupsLastUpdate.get(); - if (force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay + if ((force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay) && groupsLastUpdate.compareAndSet(lastUpdate, System.currentTimeMillis())) { Collection<Group> databaseGroups = dataManager.getAllGroups(); if (groupsById == null) { |