You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ipn, portlist: pause portlist poller when Tailscale state is Stopped #866
This still reproduces on main, LocalBackend keeps the last netmap while Stopped, CollectServices stays true, so the portlist extension keeps enumerating ports every PollInterval while Tailscale is stopped. A test sees ~20 polls in 200ms after SetState(ipn.Stopped) with a shortened interval.
Proposed fix: register a BackendStateChange hook in feature/portlist (same pattern as feature/captiveportal) and pause the poller, stopping its ticker, whenever the state isn't Starting or Running, then wake it to poll immediately on return. The wake channel becomes 1-buffered so a wake can't be lost while the loop is between checking the state and blocking.
Activity
twcclegg commentedon Nov 29, 2026
This still reproduces on main, LocalBackend keeps the last netmap while Stopped, CollectServices stays true, so the portlist extension keeps enumerating ports every PollInterval while Tailscale is stopped. A test sees ~20 polls in 200ms after SetState(ipn.Stopped) with a shortened interval.
Proposed fix: register a BackendStateChange hook in feature/portlist (same pattern as feature/captiveportal) and pause the poller, stopping its ticker, whenever the state isn't Starting or Running, then wake it to poll immediately on return. The wake channel becomes 1-buffered so a wake can't be lost while the loop is between checking the state and blocking.