aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface/init.c
diff options
context:
space:
mode:
authorGravatar Hongwei Wang <hongweiw@google.com>2015-07-31 15:22:13 -0700
committerGravatar Hongwei Wang <hongweiw@google.com>2015-07-31 15:22:13 -0700
commit12845527139b5ce7b850e1bbb132fdb9de45bc88 (patch)
treecb364c4c982f8956225d266b9997e2e4479f13ca /src/core/surface/init.c
parent8e04d4107ef07c5914b84f14d4f1b0771090c1b0 (diff)
parent11af9747152565c4f5bfe0acb453715521e8af7f (diff)
Merge branch 'master' of https://github.com/grpc/grpc into zookeeper
Diffstat (limited to 'src/core/surface/init.c')
-rw-r--r--src/core/surface/init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/surface/init.c b/src/core/surface/init.c
index cbb94a82b5..10f3634f93 100644
--- a/src/core/surface/init.c
+++ b/src/core/surface/init.c
@@ -107,8 +107,11 @@ void grpc_init(void) {
grpc_security_pre_init();
grpc_iomgr_init();
grpc_tracer_init("GRPC_TRACE");
- if (census_initialize(CENSUS_NONE)) {
- gpr_log(GPR_ERROR, "Could not initialize census.");
+ /* Only initialize census if noone else has. */
+ if (census_enabled() == CENSUS_FEATURE_NONE) {
+ if (census_initialize(census_supported())) { /* enable all features. */
+ gpr_log(GPR_ERROR, "Could not initialize census.");
+ }
}
grpc_timers_global_init();
for (plugin = g_plugins_head; plugin != NULL; plugin = plugin->next) {