Compare commits

...

1 Commits

Author SHA1 Message Date
Andrew Lytvynov
9827e6965a ipn/ipnlocal: send ClientVersion in initial WatchNotifications message
If ClientVersion was populated before WatchNotifications started, it
would never get delivered to the caller. Explicitly include it.

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-19 15:06:49 -07:00

View File

@@ -2117,8 +2117,12 @@ func (b *LocalBackend) WatchNotifications(ctx context.Context, mask ipn.NotifyWa
ini.BrowseToURL = ptr.To(b.authURLSticky)
}
}
prefs := b.sanitizedPrefsLocked()
if mask&ipn.NotifyInitialPrefs != 0 {
ini.Prefs = ptr.To(b.sanitizedPrefsLocked())
ini.Prefs = ptr.To(prefs)
}
if prefs.Valid() && prefs.AutoUpdate().Check {
ini.ClientVersion = b.lastClientVersion
}
if mask&ipn.NotifyInitialNetMap != 0 {
ini.NetMap = b.netMap