aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/MainEventHandler.java')
-rw-r--r--src/main/java/org/traccar/MainEventHandler.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/MainEventHandler.java b/src/main/java/org/traccar/MainEventHandler.java
index f04307fdb..bb84a09d2 100644
--- a/src/main/java/org/traccar/MainEventHandler.java
+++ b/src/main/java/org/traccar/MainEventHandler.java
@@ -28,6 +28,7 @@ import org.traccar.database.StatisticsManager;
import org.traccar.helper.DateUtil;
import org.traccar.helper.NetworkUtil;
import org.traccar.model.Position;
+import org.traccar.session.cache.CacheManager;
import org.traccar.storage.StorageException;
import javax.inject.Inject;
@@ -60,6 +61,7 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter {
Position position = (Position) msg;
try {
Context.getDeviceManager().updateLatestPosition(position);
+ Main.getInjector().getInstance(CacheManager.class).updatePosition(position);
} catch (StorageException error) {
LOGGER.warn("Failed to update device", error);
}