diff options
author | murgatroid99 <michael.lumish@gmail.com> | 2015-01-21 17:12:04 -0800 |
---|---|---|
committer | murgatroid99 <michael.lumish@gmail.com> | 2015-01-21 17:12:04 -0800 |
commit | 48c9c4a59e97ea3622bb1d9dc4e6e91a63c4f7f8 (patch) | |
tree | 12d1b51db0dd88a1b7ead48fe59c6bb85ff9ce8a /src/cpp/client | |
parent | 9ef3d04bfff61041ad5b9df7883fb3e30f205c65 (diff) | |
parent | 702b5b425f8f7071d0ca8480fbb72b523de72ab3 (diff) |
Resolved merge conflicts with master
Diffstat (limited to 'src/cpp/client')
-rw-r--r-- | src/cpp/client/channel.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index a8919a10d9..c8b2bb2cf6 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -104,7 +104,6 @@ Status Channel::StartBlockingRpc(const RpcMethod &method, context->set_call(call); grpc_event *ev; void *finished_tag = reinterpret_cast<char *>(call); - void *invoke_tag = reinterpret_cast<char *>(call) + 1; void *metadata_read_tag = reinterpret_cast<char *>(call) + 2; void *write_tag = reinterpret_cast<char *>(call) + 3; void *halfclose_tag = reinterpret_cast<char *>(call) + 4; @@ -115,19 +114,11 @@ Status Channel::StartBlockingRpc(const RpcMethod &method, // add_metadata from context // // invoke - GPR_ASSERT(grpc_call_start_invoke(call, cq, invoke_tag, metadata_read_tag, - finished_tag, - GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); - ev = grpc_completion_queue_pluck(cq, invoke_tag, gpr_inf_future); - bool success = ev->data.invoke_accepted == GRPC_OP_OK; - grpc_event_finish(ev); - if (!success) { - GetFinalStatus(cq, finished_tag, &status); - return status; - } + GPR_ASSERT(grpc_call_invoke(call, cq, metadata_read_tag, finished_tag, + GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); // write request grpc_byte_buffer *write_buffer = nullptr; - success = SerializeProto(request, &write_buffer); + bool success = SerializeProto(request, &write_buffer); if (!success) { grpc_call_cancel(call); status = |