From 15f9f95312666574a8a42c91e35fcd4b0aab5987 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 14 Apr 2015 14:01:39 -0700 Subject: [PATCH] Use channel tags to call methods --- src/cpp/client/channel.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index 5a39a3b801a..7a9ba477f0e 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -61,7 +61,12 @@ Channel::~Channel() { grpc_channel_destroy(c_channel_); } Call Channel::CreateCall(const RpcMethod& method, ClientContext* context, CompletionQueue* cq) { - auto c_call = grpc_channel_create_call(c_channel_, cq->cq(), method.name(), + auto c_call = method.channel_tag()? + grpc_channel_create_registered_call( + c_channel_, cq->cq(), + method.channel_tag(), context->RawDeadline()) : + + grpc_channel_create_call(c_channel_, cq->cq(), method.name(), context->authority().empty() ? target_.c_str() : context->authority().c_str(),