mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
fix actor EnqueueFrom stack overflow (use nil now to send from self) and replace session send/recv workers with actor functions
This commit is contained in:
parent
436c84ca33
commit
533da351f9
7 changed files with 132 additions and 17 deletions
|
@ -245,7 +245,7 @@ func (t *switchTable) cleanRoot() {
|
|||
if t.data.locator.root != t.key {
|
||||
t.data.seq++
|
||||
t.updater.Store(&sync.Once{})
|
||||
t.core.router.reset(&t.core.router)
|
||||
t.core.router.reset(nil)
|
||||
}
|
||||
t.data.locator = switchLocator{root: t.key, tstamp: now.Unix()}
|
||||
t.core.peers.sendSwitchMsgs()
|
||||
|
@ -508,7 +508,7 @@ func (t *switchTable) unlockedHandleMsg(msg *switchMsg, fromPort switchPort, rep
|
|||
if !equiv(&sender.locator, &t.data.locator) {
|
||||
doUpdate = true
|
||||
t.data.seq++
|
||||
t.core.router.reset(&t.core.router)
|
||||
t.core.router.reset(nil)
|
||||
}
|
||||
if t.data.locator.tstamp != sender.locator.tstamp {
|
||||
t.time = now
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue