mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03: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:
parent
7bf5884ac1
commit
1e6a6d2160
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue