aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-03-11 11:04:37 -0700
committerGravatar Vijay Pai <vpai@google.com>2015-03-11 11:04:37 -0700
commitea8d8dedc6ad27a283b2bf25c39de0d93f04fb39 (patch)
treee1b14d077c6fea3a497a2f342a27d0582580e886 /src
parent42734b58eebcbb8881b2a92fc006af6ffdd56710 (diff)
parentf82a30d90a9a2cf82cb7b441119275e3412abe72 (diff)
Merge pull request #998 from yang-g/nameoverride
Use ssl name override if it's in the channel argument
Diffstat (limited to 'src')
-rw-r--r--src/cpp/client/secure_credentials.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc
index 5eb5c54794..47f645c1b6 100644
--- a/src/cpp/client/secure_credentials.cc
+++ b/src/cpp/client/secure_credentials.cc
@@ -54,7 +54,8 @@ class SecureCredentials GRPC_FINAL : public Credentials {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return std::shared_ptr<ChannelInterface>(new Channel(
- target,
+ args.GetSslTargetNameOverride().empty()
+ ? target : args.GetSslTargetNameOverride(),
grpc_secure_channel_create(c_creds_, target.c_str(), &channel_args)));
}