diff options
Diffstat (limited to 'src/cpp/common/channel_arguments.cc')
-rw-r--r-- | src/cpp/common/channel_arguments.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index c6cad8eeae..d86ba9dd4e 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -34,6 +34,7 @@ #include <sstream> +#include <grpc++/grpc++.h> #include <grpc++/resource_quota.h> #include <grpc/impl/codegen/grpc_types.h> #include <grpc/support/log.h> @@ -42,10 +43,8 @@ namespace grpc { ChannelArguments::ChannelArguments() { - std::ostringstream user_agent_prefix; - user_agent_prefix << "grpc-c++/" << grpc_version_string(); // This will be ignored if used on the server side. - SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING, user_agent_prefix.str()); + SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING, "grpc-c++/" + Version()); } ChannelArguments::ChannelArguments(const ChannelArguments& other) |