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.core.router.reset(nil)
} }
t.data.locator = switchLocator{root: t.key, tstamp: now.Unix()} 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.data.locator = sender.locator
t.parent = sender.port 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 { if doUpdate {
t.updater.Store(&sync.Once{}) t.updater.Store(&sync.Once{})