From 2c8b01295ca6156563180e529a88d00e45327578 Mon Sep 17 00:00:00 2001 From: Ara Sadoyan Date: Wed, 21 Jan 2026 20:01:16 +0100 Subject: [PATCH] Minor subfunction removal --- src/utils/healthcheck.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/utils/healthcheck.rs b/src/utils/healthcheck.rs index 1ba969d..15ddb94 100644 --- a/src/utils/healthcheck.rs +++ b/src/utils/healthcheck.rs @@ -15,12 +15,18 @@ pub async fn hc2(upslist: Arc, fullist: Arc, loop { tokio::select! { _ = period.tick() => { - populate_upstreams(&upslist, &fullist, &idlist, params, &client).await; + // populate_upstreams(&upslist, &fullist, &idlist, params, &client).await; + let totest = build_upstreams(&fullist, params.0, &client).await; + if !compare_dashmaps(&totest, &upslist) { + clone_dashmap_into(&totest, &upslist); + clone_idmap_into(&totest, &idlist); + } } } } } +/* pub async fn populate_upstreams(upslist: &Arc, fullist: &Arc, idlist: &Arc, params: (&str, u64), client: &Client) { let totest = build_upstreams(fullist, params.0, client).await; if !compare_dashmaps(&totest, upslist) { @@ -28,6 +34,7 @@ pub async fn populate_upstreams(upslist: &Arc, fullist: &Arc UpstreamsDashMap { let client = Client::builder().timeout(Duration::from_secs(2)).danger_accept_invalid_certs(true).build().unwrap();