Skip to content
Snippets Groups Projects
Commit 6236718f authored by Craig Tiller's avatar Craig Tiller
Browse files

Merge pull request #4897 from bogdandrutu/fix

Initialize census if not initialized yet and some features are available
parents 927dae0d 7630256d
No related branches found
No related tags found
No related merge requests found
......@@ -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.");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment