From c6118280bd2d2e92c4ffec645b7997c57026d27d Mon Sep 17 00:00:00 2001 From: evgeny Date: Sat, 12 Sep 2026 20:00:48 +0300 Subject: [PATCH] =?UTF-8?q?conn=5Fmgr:=20=D0=BD=D0=B5=20=D1=83=D0=B4=D0=B0?= =?UTF-8?q?=D0=BB=D1=8F=D1=82=D1=8C=20=D0=BA=D0=B0=D0=BA=20stale=20=D0=BA?= =?UTF-8?q?=D0=B0=D0=BD=D0=B4=D0=B8=D0=B4=D0=B0=D1=82=D0=BE=D0=B2=20=D1=81?= =?UTF-8?q?=20=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=BD=D1=8B=D0=BC=20=D1=81?= =?UTF-8?q?=D0=BE=D0=B5=D0=B4=D0=B8=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routing_layer/conn_mgr_monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routing_layer/conn_mgr_monitor.c b/src/routing_layer/conn_mgr_monitor.c index 05796170..ba43f25b 100644 --- a/src/routing_layer/conn_mgr_monitor.c +++ b/src/routing_layer/conn_mgr_monitor.c @@ -185,7 +185,9 @@ void cm_candidate_ping_timer_cb(void* arg) { uint64_t nid = mgr->best_candidates[i].node_id; struct TOPO_GROUP_NODE* nq = topo_node_find_by_id(mgr->group, nid); if (!nq) { memmove(&mgr->best_candidates[i], &mgr->best_candidates[i+1], (--mgr->best_candidate_count - i) * sizeof(mgr->best_candidates[0])); i--; continue; } - if (cm_get_node_max_probe_time(nq) > 0 && (now - cm_get_node_max_probe_time(nq)) >= CONN_MGR_CANDIDATE_STALE_TB) + if (!cm_has_active_conn(mgr->group, nid) + && cm_get_node_max_probe_time(nq) > 0 + && (now - cm_get_node_max_probe_time(nq)) >= CONN_MGR_CANDIDATE_STALE_TB) { DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "conn_mgr: candidate 0x%016llx stale, removing", (unsigned long long)nid); memmove(&mgr->best_candidates[i], &mgr->best_candidates[i+1], (--mgr->best_candidate_count - i) * sizeof(mgr->best_candidates[0])); i--; continue; } if (cm_has_active_conn(mgr->group, nid)) {