TSG-1518 改进TFE查询Certstore过程的异常处理机制:增加 enable_health_check 配置项

This commit is contained in:
luwenpeng
2020-05-19 13:29:59 +08:00
parent f4b2f1a484
commit 481f754275
2 changed files with 6 additions and 1 deletions

View File

@@ -49,6 +49,7 @@ struct key_keeper
struct key_keeper_stat stat;
int cert_expire_time;
unsigned int enable_health_check;
pthread_t thread;
};
@@ -562,6 +563,7 @@ struct key_keeper* key_keeper_init(const char * profile, const char* section, vo
MESA_load_profile_string_def(profile, section, "cert_store_host", keeper->cert_store_host,
sizeof(keeper->cert_store_host), "");
MESA_load_profile_uint_def(profile, section, "enable_health_check", &(keeper->enable_health_check), 1);
MESA_load_profile_uint_def(profile, section, "cert_store_port", &(keeper->cert_store_port), 80);
MESA_load_profile_uint_def(profile, section, "hash_slot_size", &(keeper->hash_slot_size), 1024*128);
MESA_load_profile_uint_def(profile, section, "hash_expire_seconds", &(keeper->hash_expire_seconds), 5*60);
@@ -595,7 +597,7 @@ struct key_keeper* key_keeper_init(const char * profile, const char* section, vo
}
}
// KK_MODE_CERT_STORE: create thread for certstore health check
else
if (keeper->work_mode == KK_MODE_CERT_STORE && keeper->enable_health_check)
{
pthread_attr_t attr;
pthread_attr_init(&attr);