修复watch_dog 的switch bug

This commit is contained in:
fumingwei
2021-03-18 10:05:36 +08:00
parent 89ce186108
commit 4b532b6a58

View File

@@ -292,9 +292,6 @@ struct tfe_mgr* tfe_mgr_init(int tfe_node_count, const char* profile, enum kni_d
char section[KNI_SYMBOL_MAX] = "watch_dog";
MESA_load_profile_int_def(profile, section, "switch", &(mgr->watch_dog_switch), 0);
KNI_LOG_ERROR(logger, "MESA_prof_load, [%s]:\n switch: %d", section, mgr->watch_dog_switch);
if(mgr->watch_dog_switch == 0){
return mgr;
}
int keepalive_idle, keepalive_cnt, keepalive_intvl;
char keepalive_listen_eth[KNI_SYMBOL_MAX] = "";
uint32_t keepalive_listen_ip;
@@ -356,6 +353,9 @@ struct tfe_mgr* tfe_mgr_init(int tfe_node_count, const char* profile, enum kni_d
j++;
}
mgr->tfe_enabled_node_count = j;
if(mgr->watch_dog_switch == 0){
return mgr;
}
//init rw_lock
ret = pthread_rwlock_init(&(mgr->rwlock), NULL);
if(ret < 0){