storage: Implementing a quick fix for the storage benchwrapper where reads error out early due to r.Remain being unknown (-1).
@@ -74,7 +74,7 @@ func (s *server) Read(ctx context.Context, in *pb.ObjectRead) (*pb.EmptyResponse
return nil, err
}
defer r.Close()
- for int(r.Remain()) > 0 {
+ for r.Remain() > 0 || r.Remain() == -1 {
ba := make([]byte, minRead)
_, err := r.Read(ba)
if err == io.EOF {
