mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
make sure the only place traffic is ever dropped is in the switch. this currently disables the dedicated crypto workers
This commit is contained in:
parent
68dce0dd74
commit
042adb0516
4 changed files with 46 additions and 21 deletions
|
@ -304,7 +304,7 @@ func (ss *sessions) createSession(theirPermKey *crypto.BoxPubKey) *sessionInfo {
|
|||
sinfo.theirSubnet = *address.SubnetForNodeID(crypto.GetNodeID(&sinfo.theirPermPub))
|
||||
sinfo.send = make(chan []byte, 32)
|
||||
sinfo.recv = make(chan *wire_trafficPacket, 32)
|
||||
go sinfo.doWorker()
|
||||
//go sinfo.doWorker()
|
||||
ss.sinfos[sinfo.myHandle] = &sinfo
|
||||
ss.byMySes[sinfo.mySesPub] = &sinfo.myHandle
|
||||
ss.byTheirPerm[sinfo.theirPermPub] = &sinfo.myHandle
|
||||
|
@ -625,6 +625,8 @@ 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)
|
||||
return
|
||||
select {
|
||||
case sinfo.core.router.toRecv <- router_recvPacket{bs, sinfo}:
|
||||
default: // avoid deadlocks, maybe do this somewhere else?...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue