updated possible deadlock
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
40811d9754
commit
0ad77342ea
16
src/ipblc.rs
16
src/ipblc.rs
@ -150,15 +150,15 @@ async fn handle_fwblock(ctxclone: Arc<RwLock<Context>>, ret: &mut Vec<String>, f
|
|||||||
let mut ctx = ctxclone.write().await;
|
let mut ctx = ctxclone.write().await;
|
||||||
ctx.gc_blocklist().await;
|
ctx.gc_blocklist().await;
|
||||||
toblock = ctx.get_blocklist_toblock().await;
|
toblock = ctx.get_blocklist_toblock().await;
|
||||||
|
|
||||||
// apply firewall blocking
|
|
||||||
match fwblock(&toblock, ret, fwlen) {
|
|
||||||
Ok(_) => {}
|
|
||||||
Err(err) => {
|
|
||||||
println!("Err: {err}, unable to push firewall rules, use super user")
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// apply firewall blocking
|
||||||
|
match fwblock(&toblock, ret, fwlen) {
|
||||||
|
Ok(_) => {}
|
||||||
|
Err(err) => {
|
||||||
|
println!("Err: {err}, unable to push firewall rules, use super user")
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn watchfiles(ctxarc: &Arc<RwLock<Context>>) -> Receiver<FileEvent> {
|
async fn watchfiles(ctxarc: &Arc<RwLock<Context>>) -> Receiver<FileEvent> {
|
||||||
|
Loading…
Reference in New Issue
Block a user