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:
committed by
Brad Fitzpatrick
parent
a846665599
commit
52400dc6f4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user