mirror of https://github.com/v2ray/v2ray-core
Fix a bug in transport
parent
a743f7b46b
commit
90f85a7272
|
@ -12,7 +12,7 @@ func ReadFrom(reader io.Reader) ([]byte, error) {
|
|||
buffer := make([]byte, bufferSize)
|
||||
nBytes, err := reader.Read(buffer)
|
||||
if nBytes == 0 {
|
||||
buffer = nil
|
||||
return nil, err
|
||||
}
|
||||
return buffer[:nBytes], err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue