diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cpp/client/channel.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index 440423dba9..b2fc0c97ee 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -81,8 +81,11 @@ 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(), - target_.c_str(), context->RawDeadline()); + grpc_channel_create_call( + c_channel_, cq->cq(), method.name(), + context->authority().empty() ? target_.c_str() + : context->authority().c_str(), + context->RawDeadline()); context->set_call(c_call); return Call(c_call, this, cq); } |