log mdns discoveries
This commit is contained in:
parent
2ebf87272c
commit
42b742feb1
|
@ -111,7 +111,14 @@ pub fn spawn_discover_thread() -> Result<MdnsDiscoveredList, DiscoveryError> {
|
|||
None
|
||||
}) {
|
||||
let mut connections = discovered.write().await;
|
||||
connections.insert(id, (ip.to_string(), port));
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue