mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-15 09:36:58 +02:00
decrypt in place
This commit is contained in:
+3
-1
@@ -187,8 +187,10 @@ func (u *TesterConn) ListenOut(r EncReader, flush func()) error {
|
||||
return os.ErrClosed
|
||||
case p := <-u.RxPackets:
|
||||
r(p.From, p.Data, RxMeta{})
|
||||
p.Release()
|
||||
// The batcher borrows plaintext decrypted in place inside p.Data
|
||||
// until Flush, so the packet must stay alive across flush()
|
||||
flush()
|
||||
p.Release()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user