mirror of https://github.com/v2ray/v2ray-core
fix buffer pool in quic
parent
ec89d42feb
commit
163fe2523e
|
@ -36,7 +36,8 @@ func (b *packetBuffer) Release() {
|
||||||
}
|
}
|
||||||
// only put the packetBuffer back if it's not used any more
|
// only put the packetBuffer back if it's not used any more
|
||||||
if b.refCount == 0 {
|
if b.refCount == 0 {
|
||||||
bufferPool.Put(b.Slice)
|
buffer := b.Slice[0:cap(b.Slice)]
|
||||||
|
bufferPool.Put(buffer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue