mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
more peer migration
This commit is contained in:
parent
ecd23ce9fc
commit
034fece33f
2 changed files with 21 additions and 33 deletions
|
@ -248,7 +248,7 @@ func (t *switchTable) cleanRoot() {
|
|||
t.core.router.reset(nil)
|
||||
}
|
||||
t.data.locator = switchLocator{root: t.key, tstamp: now.Unix()}
|
||||
t.core.peers.sendSwitchMsgs()
|
||||
t.core.peers.sendSwitchMsgs(nil) // TODO update if/when the switch becomes an actor
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ func (t *switchTable) unlockedHandleMsg(msg *switchMsg, fromPort switchPort, rep
|
|||
}
|
||||
t.data.locator = sender.locator
|
||||
t.parent = sender.port
|
||||
t.core.peers.sendSwitchMsgs()
|
||||
t.core.peers.sendSwitchMsgs(nil) // TODO update if/when the switch becomes an actor
|
||||
}
|
||||
if doUpdate {
|
||||
t.updater.Store(&sync.Once{})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue