From d66422d9893aa1a16fc6ce744df578031e6db3b1 Mon Sep 17 00:00:00 2001 From: TJ da Tuna Date: Sat, 14 Feb 2026 12:45:47 -0600 Subject: [PATCH] Fix zombie detection stopping logging after GPS denial --- .../Components/Pages/ClientDashboard.razor | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NetworkOptimizer.Web/Components/Pages/ClientDashboard.razor b/src/NetworkOptimizer.Web/Components/Pages/ClientDashboard.razor index 7821f672..8f6bd80e 100644 --- a/src/NetworkOptimizer.Web/Components/Pages/ClientDashboard.razor +++ b/src/NetworkOptimizer.Web/Components/Pages/ClientDashboard.razor @@ -979,9 +979,14 @@ // If the GPS watcher was sending callbacks (success or error) but went completely // silent, the browser is gone - stop persisting to avoid zombie writes. // GPS signal loss still fires error callbacks, so silence = dead browser. + // GPS denied fires a single error callback then goes silent - skip zombie + // check in that case so we keep logging signal data without coordinates. var watcherSilent = _gpsWatcherId.HasValue + && !_gpsDenied && _lastGpsCallback != default && _lastGpsCallback < DateTime.UtcNow.AddSeconds(-15); + if (watcherSilent) + _isLogging = false; var persist = _isLogging && !watcherSilent; var lat = watcherSilent ? null : _gpsLat; var lng = watcherSilent ? null : _gpsLng;