aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client/create_channel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/client/create_channel.cc')
-rw-r--r--src/cpp/client/create_channel.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc
index fdaa28ffef..76a1b31e2f 100644
--- a/src/cpp/client/create_channel.cc
+++ b/src/cpp/client/create_channel.cc
@@ -32,7 +32,6 @@
*/
#include <memory>
-#include <sstream>
#include <grpc++/channel.h>
#include <grpc++/create_channel.h>
@@ -56,13 +55,8 @@ std::shared_ptr<Channel> CreateCustomChannel(
const ChannelArguments& args) {
internal::GrpcLibrary
init_lib; // We need to call init in case of a bad creds.
- ChannelArguments cp_args = args;
- std::ostringstream user_agent_prefix;
- user_agent_prefix << "grpc-c++/" << grpc_version_string();
- cp_args.SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING,
- user_agent_prefix.str());
return creds
- ? creds->CreateChannel(target, cp_args)
+ ? creds->CreateChannel(target, args)
: CreateChannelInternal("", grpc_lame_client_channel_create(
NULL, GRPC_STATUS_INVALID_ARGUMENT,
"Invalid credentials."));