updated error handling

This commit is contained in:
Paul 2023-04-10 16:44:53 +02:00
parent bb0a272d0f
commit a6f5a44c6a

View File

@ -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;
}