diff options
Diffstat (limited to 'src/main/java/org/traccar/session')
-rw-r--r-- | src/main/java/org/traccar/session/cache/CacheManager.java | 2 |
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 58320cf29..0aadb3692 100644 --- a/src/main/java/org/traccar/session/cache/CacheManager.java +++ b/src/main/java/org/traccar/session/cache/CacheManager.java @@ -381,7 +381,7 @@ public class CacheManager implements BroadcastInterface { var key = new CacheKey(clazz, id); deviceCache.computeIfPresent(key, (k, value) -> { value.release(deviceId); - return value.getReferences().size() > 0 ? value : null; + return value.getReferences().isEmpty() ? null : value; }); })); devicePositions.remove(deviceId); |