log mdns discoveries
This commit is contained in:
parent
2ebf87272c
commit
42b742feb1
|
@ -111,11 +111,18 @@ pub fn spawn_discover_thread() -> Result<MdnsDiscoveredList, DiscoveryError> {
|
|||
None
|
||||
}) {
|
||||
let mut connections = discovered.write().await;
|
||||
if !connections.get(&id).is_some_and(|(old_ip, old_port)| {
|
||||
*old_ip == ip.to_string() && *old_port == port
|
||||
}) {
|
||||
log::info!(
|
||||
"mdns: discovered {name} - id: {id}, ip: {ip}, port: {port}"
|
||||
);
|
||||
connections.insert(id, (ip.to_string(), port));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tokio::time::sleep(Duration::from_secs(5 * 60)).await;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue