aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-06-24 06:28:03 -0700
committerAnton Tananaev <anton@traccar.org>2024-06-24 06:28:03 -0700
commitd365fa63940976ec53c3b94842c3fa6ad45af242 (patch)
treedc1175801a6abf6b80e27e4cb1e6c2f9b3e08c77 /src/main
parentd47da84d3bfea34266ba83ea8595a7ad9a7031b9 (diff)
downloadtrackermap-server-d365fa63940976ec53c3b94842c3fa6ad45af242.tar.gz
trackermap-server-d365fa63940976ec53c3b94842c3fa6ad45af242.tar.bz2
trackermap-server-d365fa63940976ec53c3b94842c3fa6ad45af242.zip
Fix cache removal (fix #5356)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/session/cache/CacheManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/session/cache/CacheManager.java b/src/main/java/org/traccar/session/cache/CacheManager.java
index 064e5672f..f7458567c 100644
--- a/src/main/java/org/traccar/session/cache/CacheManager.java
+++ b/src/main/java/org/traccar/session/cache/CacheManager.java
@@ -170,7 +170,7 @@ public class CacheManager implements BroadcastInterface {
public void removeDevice(long deviceId) {
try {
lock.writeLock().lock();
- if (deviceReferences.computeIfAbsent(deviceId, k -> new AtomicInteger()).incrementAndGet() <= 0) {
+ if (deviceReferences.computeIfAbsent(deviceId, k -> new AtomicInteger()).decrementAndGet() <= 0) {
graph.removeObject(Device.class, deviceId);
devicePositions.remove(deviceId);
deviceReferences.remove(deviceId);