mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
properly fix the memory errors, it was caused by a function returning and PutBytes-ing a buffer before a worker had a chance to decrypt the buffer, so it would GetBytes the same buffer by dumb luck and then get an illegal overlap
This commit is contained in:
parent
01ea6d3d80
commit
5d323861f0
2 changed files with 4 additions and 13 deletions
|
@ -341,7 +341,7 @@ func (r *router) handleTraffic(packet []byte) {
|
|||
return
|
||||
}
|
||||
select {
|
||||
case sinfo.recv <- &p: // FIXME ideally this should be FIFO
|
||||
case sinfo.recv <- &p: // FIXME ideally this should be front drop
|
||||
default:
|
||||
util.PutBytes(p.Payload)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue