mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-04 23:52:20 -08:00
suggestExitNodeLocked no longer sends when given a nil Notify. Every caller supplies one and sends it with the standard deferred check on Notify.IsZero, or inline where the function has no other returns. SuggestExitNode, the initial Notify for a new watcher, reconcilePrefs, and the policy access check in editPrefsLocked each build their own. startLocked sends its Notify from a defer as well, so an error return between reconciling the prefs and sending them no longer drops a changed suggestion. The prefs are still sent explicitly where they were, and the Notify is cleared afterwards so the defer does not repeat them. UpdateNetmapDelta uses the same deferred check. The in-test wake-up sets Notify.Version to make the empty Notify non-zero, which sendToLocked does on every Notify anyway. Updates #22206 Signed-off-by: Brendan Creane <[email protected]>