mirror of
https://github.com/v2ray/v2ray-core.git
synced 2024-04-21 12:31:52 +00:00
refine buffer allocation
This commit is contained in:
@@ -128,7 +128,7 @@ func (r *AuthenticationReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
|
||||
if size <= buf.Size {
|
||||
b = buf.New()
|
||||
} else {
|
||||
b = buf.NewLocal(size)
|
||||
b = buf.NewLocal(uint32(size))
|
||||
}
|
||||
if err := b.Reset(buf.ReadFullFrom(r.reader, size)); err != nil {
|
||||
b.Release()
|
||||
|
||||
Reference in New Issue
Block a user