updated error handling
This commit is contained in:
parent
bb0a272d0f
commit
a6f5a44c6a
@ -71,12 +71,13 @@ pub async fn run() {
|
|||||||
hostname: gethostname(true),
|
hostname: gethostname(true),
|
||||||
ipdata: ip_to_send,
|
ipdata: ip_to_send,
|
||||||
};
|
};
|
||||||
let status = send_to_ipbl_websocket(&mut wssocketrr, &ipe).await;
|
if !send_to_ipbl_websocket(&mut wssocketrr, &ipe).await {
|
||||||
if !status {
|
drop(ctx);
|
||||||
wssocketrr = websocketreqrep(&ctxwsrr).await;
|
wssocketrr = websocketreqrep(&ctxwsrr).await;
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +97,7 @@ pub async fn run() {
|
|||||||
send_to_ipbl_api(&ctx.client, &ctx.flags.server, &ipe).await;
|
send_to_ipbl_api(&ctx.client, &ctx.flags.server, &ipe).await;
|
||||||
let status = send_to_ipbl_websocket(&mut wssocketrr, &ipe).await;
|
let status = send_to_ipbl_websocket(&mut wssocketrr, &ipe).await;
|
||||||
if !status {
|
if !status {
|
||||||
|
drop(ctx);
|
||||||
wssocketrr = websocketreqrep(&ctxwsrr).await;
|
wssocketrr = websocketreqrep(&ctxwsrr).await;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user