diff options
author | Yang Gao <yangg@google.com> | 2015-03-10 14:17:33 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-03-10 14:17:33 -0700 |
commit | f82a30d90a9a2cf82cb7b441119275e3412abe72 (patch) | |
tree | 9cb654aa12e5c8ed7b748a68a729588b7084cbf8 /src/cpp | |
parent | e0e8edfeda1f7061915bd04fd5e2f28a31064a5c (diff) |
Use ssl name override if it's in the channel argument
Diffstat (limited to 'src/cpp')
-rw-r--r-- | src/cpp/client/secure_credentials.cc | 3 |
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))); } |