1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-07-26 11:44:22 -04:00

extend buffer

This commit is contained in:
Darien Raymond 2018-03-11 23:31:37 +01:00
parent 931c8597ca
commit 34c12c1af6
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -208,6 +208,7 @@ func NewBytes(size uint32) []byte {
func FreeBytes(b []byte) {
size := cap(b)
b = b[0:cap(b)]
switch {
case size >= 128*1024:
pool128k.Put(b)