diff options
author | Bogdan Drutu <bdrutu@google.com> | 2016-01-26 12:50:22 -0800 |
---|---|---|
committer | Bogdan Drutu <bdrutu@google.com> | 2016-01-26 12:50:22 -0800 |
commit | 050072403ac346f08e76f11a8f724cfa118cbaed (patch) | |
tree | a5c1829f2c333bdea729abd6f719545589cbba0e /src/core/surface | |
parent | 927dae0da0e6f643bdcb0175dd5c2ea81c4ebce2 (diff) |
Initialize census if not initialized yet and some features are available.
Diffstat (limited to 'src/core/surface')
-rw-r--r-- | src/core/surface/init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 19cea4c4f6..ea52434ed4 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -117,8 +117,10 @@ void grpc_init(void) { grpc_iomgr_init(); grpc_executor_init(); grpc_tracer_init("GRPC_TRACE"); - /* Only initialize census if noone else has. */ - if (census_enabled() == CENSUS_FEATURE_NONE) { + /* Only initialize census if none else has and some features are available. + */ + if (census_enabled() == CENSUS_FEATURE_NONE && + census_supported() != CENSUS_FEATURE_NONE) { if (census_initialize(census_supported())) { /* enable all features. */ gpr_log(GPR_ERROR, "Could not initialize census."); } |