mirror of https://github.com/v2ray/v2ray-core
simplify code
parent
47c92fafc8
commit
141b31eb19
|
@ -49,8 +49,7 @@ func freeBytes(b []byte) {
|
||||||
size := uint32(cap(b))
|
size := uint32(cap(b))
|
||||||
b = b[0:cap(b)]
|
b = b[0:cap(b)]
|
||||||
for i := numPools - 1; i >= 0; i-- {
|
for i := numPools - 1; i >= 0; i-- {
|
||||||
ps := poolSize[i]
|
if size >= poolSize[i] {
|
||||||
if size >= ps {
|
|
||||||
pool[i].Put(b)
|
pool[i].Put(b)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue