Changes to be committed:
modified: src/server.rs
This commit is contained in:
parent
0bf8981ab1
commit
9181519ab0
@ -46,7 +46,7 @@ pub async fn server_mode(server_config: ServerConfiguration) {
|
||||
|
||||
let keepalive_sec = server_config.interface.keepalive.clone();
|
||||
// let send2hnd_cl = send2hnd.clone();
|
||||
let addrs_lcl = addresses.clone();
|
||||
// let addrs_lcl = addresses.clone();
|
||||
if keepalive_sec > 0 {
|
||||
tokio::spawn(async move {
|
||||
let mut now = std::time::Instant::now();
|
||||
@ -54,11 +54,11 @@ pub async fn server_mode(server_config: ServerConfiguration) {
|
||||
loop {
|
||||
if now.elapsed() < kps { continue; }
|
||||
now = std::time::Instant::now();
|
||||
let mut mmp = addrs_lcl.lock().await;
|
||||
mmp.values().for_each(|p| {
|
||||
// let mut mmp = addrs_lcl.lock().await;
|
||||
// mmp.values().for_each(|p| {
|
||||
//let _ = send2hnd_cl.send((UDPKeepAlive{}.serialize(), p.addr));
|
||||
});
|
||||
drop(mmp);
|
||||
// });
|
||||
// drop(mmp);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user