Page MenuHomePhabricator

D14174.id46572.diff
No OneTemporary

D14174.id46572.diff

diff --git a/services/identity/src/database/device_list.rs b/services/identity/src/database/device_list.rs
--- a/services/identity/src/database/device_list.rs
+++ b/services/identity/src/database/device_list.rs
@@ -1590,26 +1590,26 @@
"{} devices have been removed from device list. Clearing data...",
devices_being_removed.len()
);
- for device_id in devices_being_removed {
+ for device_id in &devices_being_removed {
trace!("Invalidating CSAT for device {}", device_id);
- self.delete_access_token_data(user_id, &device_id).await?;
+ self.delete_access_token_data(user_id, device_id).await?;
trace!("Clearing keys for device {}", device_id);
- self.remove_device_data(user_id, &device_id).await?;
+ self.remove_device_data(user_id, device_id).await?;
trace!("Pruning OTKs for device {}", device_id);
self
- .delete_otks_table_rows_for_user_device(user_id, &device_id)
+ .delete_otks_table_rows_for_user_device(user_id, device_id)
.await?;
-
- let device_id = device_id.to_string();
- tokio::spawn(async move {
- debug!(
- "Attempting to delete Tunnelbroker data for device: {}",
- &device_id
- );
- let result = tunnelbroker::delete_devices_data(&[device_id]).await;
- consume_error(result);
- });
}
+
+ tokio::spawn(async move {
+ debug!(
+ "Attempting to delete Tunnelbroker data for {} devices",
+ devices_being_removed.len()
+ );
+ let result =
+ tunnelbroker::delete_devices_data(&devices_being_removed).await;
+ consume_error(result);
+ });
Ok(())
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 4:45 AM (17 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2680426
Default Alt Text
D14174.id46572.diff (1 KB)

Event Timeline