Changes to be committed:

modified:   src/server.rs
This commit is contained in:
Michael Wain 2024-08-23 04:45:10 +03:00
parent b51ec2454b
commit 0bf8981ab1

View File

@ -45,7 +45,7 @@ pub async fn server_mode(server_config: ServerConfiguration) {
}); });
let keepalive_sec = server_config.interface.keepalive.clone(); let keepalive_sec = server_config.interface.keepalive.clone();
let send2hnd_cl = send2hnd.clone(); // let send2hnd_cl = send2hnd.clone();
let addrs_lcl = addresses.clone(); let addrs_lcl = addresses.clone();
if keepalive_sec > 0 { if keepalive_sec > 0 {
tokio::spawn(async move { tokio::spawn(async move {
@ -56,7 +56,7 @@ pub async fn server_mode(server_config: ServerConfiguration) {
now = std::time::Instant::now(); now = std::time::Instant::now();
let mut mmp = addrs_lcl.lock().await; let mut mmp = addrs_lcl.lock().await;
mmp.values().for_each(|p| { mmp.values().for_each(|p| {
let _ = send2hnd_cl.send((UDPKeepAlive{}.serialize(), p.addr)); //let _ = send2hnd_cl.send((UDPKeepAlive{}.serialize(), p.addr));
}); });
drop(mmp); drop(mmp);
} }