diff --git a/server/location.ts b/server/location.ts index b6a0cb1..9b26a2d 100644 --- a/server/location.ts +++ b/server/location.ts @@ -38,7 +38,12 @@ export interface LocationNextState { export const MAX_CITY_ACCURACY_KM = 100; export const CATALOG_MATCH_KM = 100; export const REGION_CHANGE_STABILITY = 3; -export const LOCATION_RECHECK_HOURS = 24; +// How stale an agent's last location check may get before a heartbeat re-runs +// detection (IP changes and pending hysteresis re-check regardless). A check is +// a sub-ms local mmdb lookup + one row update, so a short window is cheap; flap +// protection lives in REGION_CHANGE_STABILITY, not here. Was 24h — that made an +// agent registered before the GeoIP DBs existed sit Unverified for up to a day. +export const LOCATION_RECHECK_HOURS = 2; const PRIVATE_V4: Array<[number, number]> = [ // [network as u32, prefix length] — RFC1918 + loopback + link-local + CGNAT