diff --git a/src/ipblc.rs b/src/ipblc.rs index ad63fd3..d9af7fe 100644 --- a/src/ipblc.rs +++ b/src/ipblc.rs @@ -71,12 +71,13 @@ pub async fn run() { hostname: gethostname(true), ipdata: ip_to_send, }; - let status = send_to_ipbl_websocket(&mut wssocketrr, &ipe).await; - if !status { + if !send_to_ipbl_websocket(&mut wssocketrr, &ipe).await { + drop(ctx); wssocketrr = websocketreqrep(&ctxwsrr).await; - continue; + break; } } + continue } @@ -96,6 +97,7 @@ pub async fn run() { send_to_ipbl_api(&ctx.client, &ctx.flags.server, &ipe).await; let status = send_to_ipbl_websocket(&mut wssocketrr, &ipe).await; if !status { + drop(ctx); wssocketrr = websocketreqrep(&ctxwsrr).await; continue; }