mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-26 04:51:38 +00:00
don't drop send/recv traffic going through the crypto workers, just block until they're free (TODO run further tests to make sure this doesn't cycle/deadlock)
This commit is contained in:
parent
e113b8d530
commit
ddc4773b19
@ -170,11 +170,7 @@ func (r *router) sendPacket(bs []byte) {
|
||||
// Don't continue - drop the packet
|
||||
return
|
||||
}
|
||||
select {
|
||||
case sinfo.send <- bs:
|
||||
default:
|
||||
util_putBytes(bs)
|
||||
}
|
||||
sinfo.send <- bs
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,11 +221,7 @@ func (r *router) handleTraffic(packet []byte) {
|
||||
return
|
||||
}
|
||||
//go func () { sinfo.recv<-&p }()
|
||||
select {
|
||||
case sinfo.recv <- &p:
|
||||
default:
|
||||
util_putBytes(p.payload)
|
||||
}
|
||||
sinfo.recv <- &p
|
||||
}
|
||||
|
||||
func (r *router) handleProto(packet []byte) {
|
||||
|
Loading…
Reference in New Issue
Block a user