aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-08-10 15:48:34 -0700
committerGravatar yang-g <yangg@google.com>2015-08-10 15:48:34 -0700
commite71a6b094ba62a40e2c6fb8f5781c8accf07548a (patch)
tree5dcee55828cbbac839f66af461cc0d5dc540060c /src/cpp
parentad473345003bd2616649ec30b13943bacc8e43f2 (diff)
call grpc_init for defaultcredentials
Diffstat (limited to 'src/cpp')
-rw-r--r--src/cpp/client/secure_credentials.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc
index 2d6114e06b..68c72c6217 100644
--- a/src/cpp/client/secure_credentials.cc
+++ b/src/cpp/client/secure_credentials.cc
@@ -34,6 +34,7 @@
#include <grpc/support/log.h>
#include <grpc++/channel_arguments.h>
+#include <grpc++/impl/grpc_library.h>
#include "src/cpp/client/channel.h"
#include "src/cpp/client/secure_credentials.h"
@@ -61,6 +62,7 @@ std::shared_ptr<Credentials> WrapCredentials(grpc_credentials* creds) {
} // namespace
std::shared_ptr<Credentials> GoogleDefaultCredentials() {
+ GrpcLibrary init; // To call grpc_init().
return WrapCredentials(grpc_google_default_credentials_create());
}