mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-07-03 11:57:48 +00:00
use session.cancel in the router to make blocking safe, reduce size of fromRouter buffer so the drops in the switch are closer to the intended front-drop behavior
This commit is contained in:
@ -166,8 +166,8 @@ func (r *router) handleTraffic(packet []byte) {
|
||||
return
|
||||
}
|
||||
select {
|
||||
case sinfo.fromRouter <- &p: // FIXME ideally this should be front drop
|
||||
default:
|
||||
case sinfo.fromRouter <- &p:
|
||||
case <-sinfo.cancel.Finished():
|
||||
util.PutBytes(p.Payload)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user