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:
parent
544c6e8f71
commit
a52867cb69
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user