fix bug in bootstrap
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
df2668cdc1
commit
72d377f53f
@ -79,12 +79,13 @@ pub async fn run() {
|
||||
|
||||
if received_ip.msgtype == "bootstrap".to_string() {
|
||||
for ip_to_send in ctx.get_blocklist_toblock().await {
|
||||
let event = IpEvent{
|
||||
let ipe = IpEvent{
|
||||
msgtype: String::from("init"),
|
||||
ipdata: ip_to_send,
|
||||
};
|
||||
send_to_ipbl_zmq(&zmqreqsocket, &event).await;
|
||||
send_to_ipbl_zmq(&zmqreqsocket, &ipe).await;
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// refresh context blocklist
|
||||
@ -92,6 +93,7 @@ pub async fn run() {
|
||||
|
||||
// send ip list to ws and zmq sockets
|
||||
if let Some(ip) = filtered_ip {
|
||||
if received_ip.msgtype != "init" {
|
||||
println!("sending {} to ws and zmq", ip.ip);
|
||||
send_to_ipbl_ws(&ctx, &ip, &mut ret).await;
|
||||
let event = IpEvent{
|
||||
@ -101,6 +103,7 @@ pub async fn run() {
|
||||
send_to_ipbl_zmq(&zmqreqsocket, &event).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
_val = apimsg_wait => {
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user