From 35ac52ed4679707a11b3d1d220df6e080de9599e Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 15 Jan 2023 22:42:17 +0100 Subject: [PATCH] fixed gc --- src/config.rs | 6 +++--- src/ipblc.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 8c3f874..0e17df9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -156,15 +156,15 @@ impl Context { pub async fn get_blocklist_toblock(&mut self) -> Vec { let mut res: Vec = vec![]; - let now: DateTime = Local::now().trunc_subsecs(0); + //let now: DateTime = Local::now().trunc_subsecs(0); for (_, block) in self.blocklist.iter_mut() { match self.cfg.sets.get(&block.ipdata.src) { Some(set) => { if block.tryfail >= set.tryfail { res.push(block.ipdata.clone()); - if block.tryfail == set.tryfail { + /*if block.tryfail == set.tryfail { block.starttime = DateTime::from(now); - } + }*/ } } None => {} diff --git a/src/ipblc.rs b/src/ipblc.rs index 4190d84..f135fb4 100644 --- a/src/ipblc.rs +++ b/src/ipblc.rs @@ -70,7 +70,7 @@ pub async fn run() { //let mut received_ip = ipdatarx.recv(); let ipdata_wait = ipeventrx.recv(); let apimsg_wait = apirx.recv(); - let force_wait = sleep_ms(500); + let force_wait = sleep_ms(200); let ctxclone = Arc::clone(&ctxarc);