ipn/ipnlocal: only fix peerapiListener on Windows when running

It's just logspam otherwise.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/1749/head
Brad Fitzpatrick 3 years ago
parent 36fa29feec
commit a58fbb4da9

@ -232,7 +232,7 @@ func (b *LocalBackend) linkChange(major bool, ifst *interfaces.State) {
// need updating to tweak default routes.
b.updateFilter(b.netMap, b.prefs)
if runtime.GOOS == "windows" && b.netMap != nil {
if runtime.GOOS == "windows" && b.netMap != nil && b.state == ipn.Running {
want := len(b.netMap.Addresses)
b.logf("linkChange: peerAPIListeners too low; trying again")
if len(b.peerAPIListeners) < want {

Loading…
Cancel
Save