mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix(status): preserve cached aircraft age and independent refresh errors
This commit is contained in:
1 parent
8eb6d09105
commit
dae5f45426
9 files changed
+174
-14
No files matched your search
@@ -2833,7 +2833,9 @@ const militaryFlightsLayer = {
|
||||
_retryAt = 0;
|
||||
_lastError = null;
|
||||
const currentIcaos = new Set();
|
||||
const receiptNowMs = Date.now();
|
||||
const cacheAgeMs = Number(response.headers?.get?.('x-ads-b-cache-age-ms'));
|
||||
const receiptNowMs = Date.now() - (Number.isFinite(cacheAgeMs) && cacheAgeMs > 0 ? cacheAgeMs : 0);
|
||||
_backoff = response.headers?.get?.('x-ads-b-cache') === 'STALE';
|
||||
// Field-test fix (RS46): coarse floor cells to warm for the below-ground
|
||||
// clamp — collected during the loop (low airborne contacts only),
|
||||
// batch-resolved once after it. Never a fetch inside the loop.
|
||||
@@ -3215,7 +3217,7 @@ const militaryFlightsLayer = {
|
||||
registerMilitaryIcaos(currentIcaos);
|
||||
|
||||
_count = _billboards.size;
|
||||
_lastUpdate = Date.now();
|
||||
_lastUpdate = receiptNowMs;
|
||||
_lastTrackingRefreshOutcome = {
|
||||
epoch: trackingRefreshEpoch,
|
||||
status: 'accepted',
|
||||
|
||||
Reference in new issue
Block a user