diff options
-rw-r--r-- | test/cpp/microbenchmarks/bm_chttp2_transport.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc index 254d57de20..265a5a6b22 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc @@ -541,9 +541,11 @@ static void BM_TransportStreamRecv(benchmark::State &state) { grpc_closure_sched(exec_ctx, c.get(), GRPC_ERROR_NONE); return; } - } while (grpc_byte_stream_next(exec_ctx, recv_stream, &recv_slice, + } while (grpc_byte_stream_next(exec_ctx, recv_stream, recv_stream->length - received, - drain_continue.get())); + drain_continue.get()) && + GRPC_ERROR_NONE == grpc_byte_stream_pull(exec_ctx, recv_stream, + &recv_slice)); }); drain_continue = MakeClosure([&](grpc_exec_ctx *exec_ctx, grpc_error *error) { |