1
0
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:
Darien Raymond 2017-11-20 11:13:27 +01:00
parent ee8d2ebfa9
commit ec8f8d4e10
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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
}