mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
move router.recvPacket calls into the main router goroutine, to make the ckr checks threadsafe
This commit is contained in:
parent
ae4107a3b2
commit
5fa23b1e38
2 changed files with 18 additions and 8 deletions
|
@ -589,5 +589,5 @@ func (sinfo *sessionInfo) doRecv(p *wire_trafficPacket) {
|
|||
sinfo.updateNonce(&p.Nonce)
|
||||
sinfo.time = time.Now()
|
||||
sinfo.bytesRecvd += uint64(len(bs))
|
||||
sinfo.core.router.recvPacket(bs, sinfo)
|
||||
sinfo.core.router.toRecv <- router_recvPacket{bs, sinfo}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue