mirror of
https://github.com/v2ray/v2ray-core.git
synced 2024-04-21 12:31:52 +00:00
fix buffer pool in quic
This commit is contained in:
+2
-1
@@ -36,7 +36,8 @@ func (b *packetBuffer) Release() {
|
||||
}
|
||||
// only put the packetBuffer back if it's not used any more
|
||||
if b.refCount == 0 {
|
||||
bufferPool.Put(b.Slice)
|
||||
buffer := b.Slice[0:cap(b.Slice)]
|
||||
bufferPool.Put(buffer)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user