Fix a bug in transport

pull/40/head
V2Ray 2015-10-07 13:37:40 +02:00
parent a743f7b46b
commit 90f85a7272
1 changed files with 1 additions and 1 deletions

View File

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