ipnlocal: move log line inside if statement

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
David Crawshaw 2021-07-06 09:07:18 -07:00 committed by David Crawshaw
parent 14f901da6d
commit 805d5d3cde

View File

@ -246,8 +246,8 @@ func (b *LocalBackend) linkChange(major bool, ifst *interfaces.State) {
if peerAPIListenAsync && 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 {
b.logf("linkChange: peerAPIListeners too low; trying again")
go b.initPeerAPIListener()
}
}