diff --git a/src/ipblc.rs b/src/ipblc.rs index e0f9540..7b579fe 100644 --- a/src/ipblc.rs +++ b/src/ipblc.rs @@ -14,6 +14,7 @@ use std::collections::HashMap; use std::sync::Arc; use tokio::sync::mpsc::{channel, Receiver, Sender}; use tokio::sync::RwLock; +use tokio::time::sleep; pub const PKG_NAME: &str = env!("CARGO_PKG_NAME"); const BL_CHAN_SIZE: usize = 32; @@ -68,6 +69,7 @@ pub async fn run() { //let mut received_ip = ipdatarx.recv(); let ipdata_wait = ipeventrx.recv(); let apimsg_wait = apirx.recv(); + let force_wait = sleep(tokio::time::Duration::from_millis(200)); let ctxclone = Arc::clone(&ctxarc); @@ -106,6 +108,7 @@ pub async fn run() { } _val = apimsg_wait => { } + _val = force_wait => {} }; let toblock;