mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 09:26:21 -05:00
Fix a bug in transport
This commit is contained in:
parent
a743f7b46b
commit
90f85a7272
@ -12,7 +12,7 @@ func ReadFrom(reader io.Reader) ([]byte, error) {
|
|||||||
buffer := make([]byte, bufferSize)
|
buffer := make([]byte, bufferSize)
|
||||||
nBytes, err := reader.Read(buffer)
|
nBytes, err := reader.Read(buffer)
|
||||||
if nBytes == 0 {
|
if nBytes == 0 {
|
||||||
buffer = nil
|
return nil, err
|
||||||
}
|
}
|
||||||
return buffer[:nBytes], err
|
return buffer[:nBytes], err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user