1
0
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:
V2Ray 2015-10-07 13:37:40 +02:00
parent a743f7b46b
commit 90f85a7272

View File

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