use crate::config::Context; use crate::ip::{push_ip, IpData}; use crate::utils::sleep_s; pub async fn send_to_ipbl_ws(ctx: &Context, ip: &mut IpData, ret: &mut Vec) { ret.push(format!("host: {hostname}", hostname = ctx.hostname)); loop { match push_ip(&ctx, &ip, ret).await { Ok(_) => { break; } Err(err) => { println!("{err}"); sleep_s(1).await; } }; } }