Files
tailscale/health
Nick Khyl cb5166bdc7 health: don't publish a stale Change from a superseded visibility timer
The visibility timer's callback only checked that its Warnable was
still unhealthy. If the Warnable was reset just as the timer fired, the
callback published the old Change even though the Warnable was no
longer visible, and removed the new timer from pendingVisibleTimers, so
that SetHealthy could not stop it. Similarly, changing a pending
Warnable's args left the old timer running.

Subscribers such as captive portal detection then received a Change for
a Warnable that was not in CurrentState.

Stop the pending timer when the unhealthy state changes, and make the
callback check that the state it was started for is still current.

Updates #15396
Updates #1634
Updates tailscale/corp#27985

Signed-off-by: Nick Khyl <[email protected]>
2026-12-03 07:58:51 -08:00
..