mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-08-02 13:10:31 -04:00
remove BufferedReader.Direct
This commit is contained in:
@@ -90,8 +90,6 @@ type BufferedReader struct {
|
||||
Reader Reader
|
||||
// Buffer is the internal buffer to be read from first
|
||||
Buffer MultiBuffer
|
||||
// Direct indicates whether or not to use the internal buffer
|
||||
Direct bool
|
||||
}
|
||||
|
||||
// BufferedBytes returns the number of bytes that is cached in this reader.
|
||||
@@ -118,12 +116,6 @@ func (r *BufferedReader) Read(b []byte) (int, error) {
|
||||
return nBytes, nil
|
||||
}
|
||||
|
||||
if r.Direct {
|
||||
if reader, ok := r.Reader.(io.Reader); ok {
|
||||
return reader.Read(b)
|
||||
}
|
||||
}
|
||||
|
||||
mb, err := r.Reader.ReadMultiBuffer()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
||||
Reference in New Issue
Block a user