1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 23:47:07 -05:00

not necessary for a large buffer

This commit is contained in:
Darien Raymond 2016-12-07 12:21:24 +01:00
parent 544c6e8f71
commit a52867cb69
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -33,7 +33,7 @@ func NewAdaptiveReader(reader io.Reader) *AdaptiveReader {
func (v *AdaptiveReader) Read() (*alloc.Buffer, error) { func (v *AdaptiveReader) Read() (*alloc.Buffer, error) {
if v.highVolumn && v.largeBuffer.IsEmpty() { if v.highVolumn && v.largeBuffer.IsEmpty() {
if v.largeBuffer == nil { if v.largeBuffer == nil {
v.largeBuffer = alloc.NewLocalBuffer(256 * 1024) v.largeBuffer = alloc.NewLocalBuffer(32 * 1024)
} }
nBytes, err := v.largeBuffer.FillFrom(v.reader) nBytes, err := v.largeBuffer.FillFrom(v.reader)
if err != nil { if err != nil {