fix: msg on non-root, removed useless logs
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
dda5f09831
commit
c619fea5cb
@ -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}");
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user