mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-01 06:55:25 -05:00
refine buffer allocation
This commit is contained in:
@@ -81,7 +81,7 @@ func (v *ChunkReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
||||
if length > buf.Size {
|
||||
// Theoretically the size of a chunk is 64K, but most Shadowsocks implementations used <4K buffer.
|
||||
buffer.Release()
|
||||
buffer = buf.NewLocal(int(length) + 128)
|
||||
buffer = buf.NewLocal(uint32(length) + 128)
|
||||
}
|
||||
|
||||
buffer.Clear()
|
||||
|
||||
Reference in New Issue
Block a user