From f63854a2abdbb5996a8cc7d9ab1a3c90d023d557 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Fri, 31 May 2024 17:08:05 +0200 Subject: [PATCH] Drop stale tracking data --- server/driver/history.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/driver/history.h b/server/driver/history.h index f5e91e8c..6c4fb688 100644 --- a/server/driver/history.h +++ b/server/driver/history.h @@ -80,6 +80,13 @@ public: return {}; } + if (at_timestamp_ns - data.back().at_timestamp_ns > 1'000'000'000) + { + // stale data + data.clear(); + return {}; + } + if (data.size() == 1) { return {ex, data.front()};