mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-16 00:47:02 +02:00
cap RX buffers in UDP rather than callers
This commit is contained in:
+1
-1
@@ -189,7 +189,7 @@ func (u *TesterConn) ListenOut(r EncReader, flush func()) error {
|
||||
case <-u.done:
|
||||
return os.ErrClosed
|
||||
case p := <-u.RxPackets:
|
||||
r(p.From, p.Data)
|
||||
r(p.From, p.Data[:len(p.Data):len(p.Data)])
|
||||
// The batcher borrows plaintext decrypted in place inside p.Data
|
||||
// until Flush, so the packet must stay alive across flush()
|
||||
flush()
|
||||
|
||||
Reference in New Issue
Block a user