mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
update switch
This commit is contained in:
parent
b2a2e251ad
commit
e5b88c0da3
@ -250,7 +250,7 @@ func (t *switchTable) cleanRoot() {
|
||||
t.core.router.reset(nil)
|
||||
}
|
||||
t.data.locator = switchLocator{root: t.key, tstamp: now.Unix()}
|
||||
t.core.peers.sendSwitchMsgs(nil) // TODO update if/when the switch becomes an actor
|
||||
t.core.peers.sendSwitchMsgs(t)
|
||||
}
|
||||
}
|
||||
|
||||
@ -517,7 +517,7 @@ func (t *switchTable) unlockedHandleMsg(msg *switchMsg, fromPort switchPort, rep
|
||||
}
|
||||
t.data.locator = sender.locator
|
||||
t.parent = sender.port
|
||||
t.core.peers.sendSwitchMsgs(nil) // TODO update if/when the switch becomes an actor
|
||||
t.core.peers.sendSwitchMsgs(t)
|
||||
}
|
||||
if doUpdate {
|
||||
t.updater.Store(&sync.Once{})
|
||||
|
Loading…
Reference in New Issue
Block a user