mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-04 23:52:20 -08:00
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]>