mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 09:26:21 -05:00
fix length calculation in bufferToBytesReader.WriteTo
This commit is contained in:
parent
10712b3235
commit
2f5d501643
@ -73,10 +73,10 @@ func (r *bufferToBytesReader) writeToInternal(writer io.Writer) (int64, error) {
|
||||
mbWriter := NewWriter(writer)
|
||||
totalBytes := int64(0)
|
||||
if r.leftOver != nil {
|
||||
totalBytes += int64(r.leftOver.Len())
|
||||
if err := mbWriter.Write(r.leftOver); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
totalBytes += int64(r.leftOver.Len())
|
||||
}
|
||||
|
||||
for {
|
||||
|
Loading…
Reference in New Issue
Block a user