From 4b532b6a588bb46f858719c9193420f12addb2a7 Mon Sep 17 00:00:00 2001 From: fumingwei Date: Thu, 18 Mar 2021 10:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwatch=5Fdog=20=E7=9A=84switch?= =?UTF-8?q?=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/tfe_mgr.cpp | 6 +++--- 1 file 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){