ipn/ipnlocal: add back a watchdog after earlier removal from engine

Commit 2b338dd6a8 removed watchdogEngine because it was weird
(so many methods) and increasingly unnecessary after we'd cleaned up
and simplified so much of the locking.

This adds back a watchdog, but an easier to maintain one that's more
idiomatic.

Updates #19759

Change-Id: I86c458473e126c0809f37696446ce7acf4cc4eb9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2026-06-02 11:57:12 -07:00
committed by Brad Fitzpatrick
parent a846665599
commit 52400dc6f4
14 changed files with 329 additions and 0 deletions
+9
View File
@@ -353,6 +353,15 @@ func (t *Tracker) nil() bool {
return true
}
// ProbeLocks acquires and releases the tracker's internal mutex.
func (t *Tracker) ProbeLocks() {
if t.nil() {
return
}
t.mu.Lock()
t.mu.Unlock()
}
// Severity represents how serious an error is. Each GUI interprets this severity value in different ways,
// to surface the error in a more or less visible way. For instance, the macOS GUI could change its menubar
// icon to display an exclamation mark and present a modal notification for SeverityHigh warnings, but not