mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
commit
fc5a5830aa
9 changed files with 261 additions and 517 deletions
|
@ -186,8 +186,11 @@ func (p *peer) linkLoop() {
|
|||
}
|
||||
p.sendSwitchMsg()
|
||||
case _ = <-tick.C:
|
||||
if p.dinfo != nil {
|
||||
p.core.dht.peers <- p.dinfo
|
||||
//break // FIXME disabled the below completely to test something
|
||||
pdinfo := p.dinfo // FIXME this is a bad workarond NPE on the next line
|
||||
if pdinfo != nil {
|
||||
dinfo := *pdinfo
|
||||
p.core.dht.peers <- &dinfo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +336,7 @@ func (p *peer) handleSwitchMsg(packet []byte) {
|
|||
key: p.box,
|
||||
coords: loc.getCoords(),
|
||||
}
|
||||
p.core.dht.peers <- &dinfo
|
||||
//p.core.dht.peers <- &dinfo
|
||||
p.dinfo = &dinfo
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue