Skip to content
Snippets Groups Projects
Commit 97a0ded7 authored by Muxi Yan's avatar Muxi Yan
Browse files

Fix bm_chttp2_transport

parent 50da9d83
Branches
Tags
No related merge requests found
...@@ -572,11 +572,13 @@ static void BM_TransportStreamRecv(benchmark::State &state) { ...@@ -572,11 +572,13 @@ static void BM_TransportStreamRecv(benchmark::State &state) {
} while (grpc_byte_stream_next(exec_ctx, recv_stream, } while (grpc_byte_stream_next(exec_ctx, recv_stream,
recv_stream->length - received, recv_stream->length - received,
drain_continue.get()) && drain_continue.get()) &&
GRPC_ERROR_NONE == grpc_byte_stream_pull(exec_ctx, recv_stream, GRPC_ERROR_NONE ==
&recv_slice)); grpc_byte_stream_pull(exec_ctx, recv_stream, &recv_slice) &&
(received += GRPC_SLICE_LENGTH(recv_slice), true));
}); });
drain_continue = MakeClosure([&](grpc_exec_ctx *exec_ctx, grpc_error *error) { drain_continue = MakeClosure([&](grpc_exec_ctx *exec_ctx, grpc_error *error) {
grpc_byte_stream_pull(exec_ctx, recv_stream, &recv_slice);
received += GRPC_SLICE_LENGTH(recv_slice); received += GRPC_SLICE_LENGTH(recv_slice);
grpc_slice_unref_internal(exec_ctx, recv_slice); grpc_slice_unref_internal(exec_ctx, recv_slice);
grpc_closure_run(exec_ctx, drain.get(), GRPC_ERROR_NONE); grpc_closure_run(exec_ctx, drain.get(), GRPC_ERROR_NONE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment