Skip to content

Commit

Permalink
Await cache update
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcoxson committed Jan 29, 2025
1 parent 0d86964 commit a49153c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,15 @@ impl SharedDevices {
}
}

pub fn get_udid_from_mac(&mut self, mac: String) -> Result<String, ()> {
pub async fn get_udid_from_mac(&mut self, mac: String) -> Result<String, ()> {
info!("Getting UDID for MAC: {:?}", mac);
if let Some(udid) = self.known_mac_addresses.get(&mac) {
info!("Found UDID: {:?}", udid);
return Ok(udid.to_string());
} else {
trace!("No UDID found for {:?} in cache, re-caching...", mac);
}
self.update_cache();
self.update_cache().await;

if let Some(udid) = self.known_mac_addresses.get(&mac) {
info!("Found UDID: {:?}", udid);
Expand Down

0 comments on commit a49153c

Please sign in to comment.