aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface
diff options
context:
space:
mode:
authorGravatar Bogdan Drutu <bdrutu@google.com>2016-01-26 19:11:12 -0800
committerGravatar Bogdan Drutu <bdrutu@google.com>2016-01-26 19:11:12 -0800
commit33473134d91c445f9107ee90bd61a594190ad897 (patch)
tree5f29671d6bef3f3d9bab174eb26dcc6ca420544c /src/core/surface
parent587ef5101e94aae6e431a9a7042f3e432ec3e85e (diff)
parenteaf944adc2c0351ae49bcb86100febe188db4400 (diff)
Merge remote-tracking branch 'upstream/master' into bug
Diffstat (limited to 'src/core/surface')
-rw-r--r--src/core/surface/init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/surface/init.c b/src/core/surface/init.c
index 19cea4c4f6..e3ab70dba7 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 no one 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.");
}