more peer migration

This commit is contained in:
Arceliar 2019-08-24 13:15:29 -05:00
parent ecd23ce9fc
commit 034fece33f
2 changed files with 21 additions and 33 deletions

View file

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