safer linkloop

This commit is contained in:
Arceliar 2019-08-24 12:59:20 -05:00
parent 88161009e9
commit ecd23ce9fc

View File

@ -213,7 +213,7 @@ func (p *peer) linkLoop() {
case dinfo = <-p.dinfo:
case _ = <-tick.C:
if dinfo != nil {
p.core.router.insertPeer(nil, dinfo)
<-p.SyncExec(func() { p.core.router.insertPeer(p, dinfo) })
}
}
}