Explorar el Código

Fix a bug in transport

V2Ray hace 10 años
padre
commit
90f85a7272
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      common/net/transport.go

+ 1 - 1
common/net/transport.go

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