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);