fix: msg on non-root, removed useless logs
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Paul 2023-01-11 18:00:23 +01:00
parent dda5f09831
commit c619fea5cb
3 changed files with 8 additions and 5 deletions

View File

@ -34,9 +34,7 @@ pub async fn apiserver(ctxarc: &Arc<Mutex<Context>>) -> io::Result<()> {
Ok(dt) => {
let (_reader, mut writer) = stream.into_split();
match writer.write_all(format!("{dt}").as_bytes()).await {
Ok(a) => {
println!("{a:?}");
}
Ok(_) => {}
Err(err) => {
println!("{err}");
}

View File

@ -102,7 +102,12 @@ pub async fn run() {
toblock = ctx.get_blocklist_toblock().await;
}
// apply firewall blocking
fwblock(&toblock, &mut ret, &mut fwlen).unwrap();
match fwblock(&toblock, &mut ret, &mut fwlen) {
Ok(_) => {}
Err(err) => {
println!("Err: {err}, unable to push firewall rules, use super user")
}
};
// log lines
if ret.len() > 0 {

View File

@ -33,7 +33,7 @@ pub fn _dedup<T: Ord + PartialOrd>(list: &mut Vec<T>) -> usize {
list.len()
}
pub async fn sleep_ms(ms: u64) {
pub async fn _sleep_ms(ms: u64) {
sleep(Duration::from_millis(ms)).await;
}