mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-01 14:12:32 -08:00
Every health change while connectivity remained impacted ran captive portal detection again, even though nothing about the network had changed. Track whether detection is due. It becomes due when connectivity stops being impacted and when netmon reports a network change that likely requires a rebind, and is no longer due once detection has run. Health and pref changes still call maybeDetectCaptivePortal, but it only runs detection when it is due. Otherwise, it just drops the warning once connectivity is no longer impacted. A result can still become wrong without either: the portal may start intercepting after detection ran, or the user may log in to it while connectivity remains impacted for other reasons. So detection also becomes due on a health change while a captive portal is detected, and on a retry timer that doubles from 2 to 60 seconds while connectivity remains impacted. With retries, detection no longer waits 2 seconds before its first run. Updates #15396 Updates #1634 Updates tailscale/corp#27985 Signed-off-by: Nick Khyl <[email protected]>