ipn: call SetNetInfoCallback later, in Start
It was being called back into ultimately from magicsock before there was a control client. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
680311b3df
commit
7740cbd8d9
|
@ -87,8 +87,6 @@ func NewLocalBackend(logf logger.Logf, logid string, store StateStore, e wgengin
|
||||||
}
|
}
|
||||||
b.statusChanged = sync.NewCond(&b.statusLock)
|
b.statusChanged = sync.NewCond(&b.statusLock)
|
||||||
|
|
||||||
e.SetNetInfoCallback(b.SetNetInfo)
|
|
||||||
|
|
||||||
if b.portpoll != nil {
|
if b.portpoll != nil {
|
||||||
go b.portpoll.Run(ctx)
|
go b.portpoll.Run(ctx)
|
||||||
go b.runPoller()
|
go b.runPoller()
|
||||||
|
@ -290,6 +288,8 @@ func (b *LocalBackend) Start(opts Options) error {
|
||||||
b.send(Notify{Engine: &es})
|
b.send(Notify{Engine: &es})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
b.e.SetNetInfoCallback(b.SetNetInfo)
|
||||||
|
|
||||||
b.mu.Lock()
|
b.mu.Lock()
|
||||||
prefs := b.prefs.Clone()
|
prefs := b.prefs.Clone()
|
||||||
b.mu.Unlock()
|
b.mu.Unlock()
|
||||||
|
|
Loading…
Reference in New Issue