mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-09 18:21:32 +09:00
2d04fff605
The legacy routes.PrimaryRoutes.SetRoutes(node, empty) implicitly deleted the node from the unhealthy set; the snapshot refactor lost that side-effect, so a probe timeout that landed during a SetApprovedRoutes(empty) (or just before a Disconnect) left Unhealthy=true forever. The bit then surfaced in DebugRoutes and broke TestHASubnetRouterFailover. Restore the invariant at the write boundaries that drop HA candidacy (Disconnect, SetApprovedRoutes, UpdateNodeFromMapRequest) and add a defensive guard in SetNodeUnhealthy so the prober's post-timeout write cannot install a stale bit when the node has since left the candidate set. Updates #3203