diff options
| author | fumingwei <[email protected]> | 2021-03-18 10:05:36 +0800 |
|---|---|---|
| committer | fumingwei <[email protected]> | 2021-03-18 10:05:36 +0800 |
| commit | 4b532b6a588bb46f858719c9193420f12addb2a7 (patch) | |
| tree | 0609730a63283533a4c5f159807c14ac919eab97 | |
| parent | 89ce1861087a674219a34ae1c1fe27b5ff1baf07 (diff) | |
修复watch_dog 的switch bug
| -rw-r--r-- | entry/src/tfe_mgr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/entry/src/tfe_mgr.cpp b/entry/src/tfe_mgr.cpp index 269dd88..1c80a47 100644 --- a/entry/src/tfe_mgr.cpp +++ b/entry/src/tfe_mgr.cpp @@ -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){ |
