bugfix: sf_status与health check module的状态同步
This commit is contained in:
@@ -252,7 +252,6 @@ int health_check_session_del(uint64_t session_id, int profile_id)
|
|||||||
struct bfd_vtysh_client client;
|
struct bfd_vtysh_client client;
|
||||||
struct session_iterm *tmp = NULL;
|
struct session_iterm *tmp = NULL;
|
||||||
|
|
||||||
sf_status_delete(g_sf_status, profile_id);
|
|
||||||
tmp = health_check_get_iterm_by_id(session_id);
|
tmp = health_check_get_iterm_by_id(session_id);
|
||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
LOG_DEBUG("health check session table delete: session id [%lu] not exists", session_id);
|
LOG_DEBUG("health check session table delete: session id [%lu] not exists", session_id);
|
||||||
@@ -276,6 +275,7 @@ int health_check_session_del(uint64_t session_id, int profile_id)
|
|||||||
end:
|
end:
|
||||||
pthread_rwlock_wrlock(&g_handle.rwlock);
|
pthread_rwlock_wrlock(&g_handle.rwlock);
|
||||||
HASH_DELETE(hh1, g_handle.root_by_id, tmp);
|
HASH_DELETE(hh1, g_handle.root_by_id, tmp);
|
||||||
|
sf_status_delete(g_sf_status, profile_id);
|
||||||
pthread_rwlock_unlock(&g_handle.rwlock);
|
pthread_rwlock_unlock(&g_handle.rwlock);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
tmp = NULL;
|
tmp = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user