Merge pull request #3978 from nats-io/neil/encfix

Don't recycle buffer more than once
This commit is contained in:
Neil
2023-03-17 09:42:19 +00:00
committed by GitHub

View File

@@ -4001,9 +4001,6 @@ func (mb *msgBlock) flushPendingMsgsLocked() (*LostStreamData, error) {
dst = make([]byte, lob)
}
mb.bek.XORKeyStream(dst, buf)
if cap(buf) <= defaultLargeBlockSize {
recycleMsgBlockBuf(buf)
}
buf = dst
}