fixed gc
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Paul 2023-01-15 22:42:17 +01:00
parent bb9404ec7c
commit 35ac52ed46
2 changed files with 4 additions and 4 deletions

View File

@ -156,15 +156,15 @@ impl Context {
pub async fn get_blocklist_toblock(&mut self) -> Vec<IpData> {
let mut res: Vec<IpData> = vec![];
let now: DateTime<Local> = Local::now().trunc_subsecs(0);
//let now: DateTime<Local> = 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 => {}

View File

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