5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-23 13:25:39 +00:00

update switch

This commit is contained in:
Arceliar 2019-08-25 23:07:56 -05:00
parent b2a2e251ad
commit e5b88c0da3

View File

@ -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{})