Skip to content
Snippets Groups Projects
Commit 2446114b authored by Vijay Pai's avatar Vijay Pai
Browse files

Merge remote-tracking branch 'dgq/fix-grpc-lib' into make_clang_great_again_v2

parents c0e3952d 146070db
No related branches found
No related tags found
No related merge requests found
...@@ -58,8 +58,12 @@ static CoreCodegen g_core_codegen; ...@@ -58,8 +58,12 @@ static CoreCodegen g_core_codegen;
class GrpcLibraryInitializer GRPC_FINAL { class GrpcLibraryInitializer GRPC_FINAL {
public: public:
GrpcLibraryInitializer() { GrpcLibraryInitializer() {
grpc::g_glip = &g_gli; if (grpc::g_glip == nullptr) {
grpc::g_core_codegen_interface = &g_core_codegen; grpc::g_glip = &g_gli;
}
if (grpc::g_core_codegen_interface == nullptr) {
grpc::g_core_codegen_interface = &g_core_codegen;
}
} }
/// A no-op method to force the linker to reference this class, which will /// A no-op method to force the linker to reference this class, which will
......
...@@ -60,8 +60,7 @@ std::shared_ptr<grpc::Channel> SecureChannelCredentials::CreateChannel( ...@@ -60,8 +60,7 @@ std::shared_ptr<grpc::Channel> SecureChannelCredentials::CreateChannel(
SecureCallCredentials::SecureCallCredentials(grpc_call_credentials* c_creds) SecureCallCredentials::SecureCallCredentials(grpc_call_credentials* c_creds)
: c_creds_(c_creds) { : c_creds_(c_creds) {
internal::GrpcLibraryInitializer gli_initializer; g_gli_initializer.summon();
gli_initializer.summon();
} }
bool SecureCallCredentials::ApplyToCall(grpc_call* call) { bool SecureCallCredentials::ApplyToCall(grpc_call* call) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment