copy/paste old flowkey logic into a util function, add a struct of key and packet, make WriteNoCopy accept this instead of a slice

This commit is contained in:
Arceliar 2019-08-06 19:25:55 -05:00
parent 6cb0ed91ad
commit 790524bd1c
5 changed files with 105 additions and 52 deletions

View file

@ -166,7 +166,7 @@ func (r *router) handleTraffic(packet []byte) {
return
}
select {
case sinfo.fromRouter <- &p:
case sinfo.fromRouter <- p:
case <-sinfo.cancel.Finished():
util.PutBytes(p.Payload)
}