macOS: repair network recovery and improve diagnostics

This commit is contained in:
Dev Scribe authored and Cuong Manh Le committed 2026-09-18 13:36:47 +07:00
1 parent 246a54020d
commit 13471ba128
18 files changed
+2271 -321

No files matched your search

+8
View File
@@ -163,6 +163,14 @@ type prog struct {
recoveryRunning atomic.Bool
recoveryGen atomic.Uint64
// All deltas get an ID. Only accepted deltas replace recovery ownership.
networkTransitionGen atomic.Uint64
networkAcceptedGen atomic.Uint64
networkSourceMu sync.Mutex
networkSourceState *netmon.State
networkSourceEpoch *netmon.State
networkSourceReadFailed bool
// recoveryDebounceTimer coalesces rapid NetworkChange recovery triggers
// into a single handleRecovery call. Only handleRecovery is debounced —
// all other state updates (IP, pf anchor, VPN DNS) run immediately.