1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-28 14:56:33 -04:00

Buffer pool is mistakenly generate more buffers under normal situation.

This commit is contained in:
V2Ray 2015-10-10 16:50:55 +02:00
parent 083b1d4736
commit bf6898539b

View File

@ -97,7 +97,7 @@ func (p *bufferPool) cleanup(tick <-chan time.Time) {
<-p.chain
continue
}
for delta := pSize - p.buffers2Keep; delta > 0; delta-- {
for delta := p.buffers2Keep - pSize; delta > 0; delta-- {
p.chain <- make([]byte, p.bufferSize)
}
}