mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-03 07:56:42 -05:00
remove check for ReaderFrom on underlying writer, as it may be badly implemented.
This commit is contained in:
parent
ee8d2ebfa9
commit
ec8f8d4e10
@ -137,12 +137,8 @@ func (w *BufferedWriter) ReadFrom(reader io.Reader) (int64, error) {
|
||||
}
|
||||
|
||||
w.buffered = false
|
||||
|
||||
if readerFrom, ok := w.writer.(io.ReaderFrom); ok {
|
||||
return readerFrom.ReadFrom(reader)
|
||||
}
|
||||
|
||||
err := Copy(NewReader(reader), w, CountSize(&sc))
|
||||
|
||||
return sc.Size, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user