ipn/ipnlocal: on Windows peerapi bind failures, try again on link change

Updates #1620

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/1623/head
Brad Fitzpatrick 3 years ago
parent a7be780155
commit cf2beafbcd

@ -200,6 +200,14 @@ func (b *LocalBackend) linkChange(major bool, ifst *interfaces.State) {
// If the local network configuration has changed, our filter may
// need updating to tweak default routes.
b.updateFilter(b.netMap, b.prefs)
if runtime.GOOS == "windows" && b.netMap != nil {
want := len(b.netMap.Addresses)
b.logf("linkChange: peerAPIListeners too low; trying again")
if len(b.peerAPIListeners) < want {
go b.initPeerAPIListener()
}
}
}
func (b *LocalBackend) onHealthChange(sys health.Subsystem, err error) {

Loading…
Cancel
Save