Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion server/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading