mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
fix recovery
This commit is contained in:
committed by
Aiden McClelland
parent
c199a6525f
commit
b2fa955ad5
@@ -124,7 +124,12 @@ impl SetupContext {
|
||||
}
|
||||
pub async fn product_key(&self) -> Result<Arc<String>, Error> {
|
||||
Ok(
|
||||
if let Some(k) = { self.cached_product_key.read().await.clone() } {
|
||||
if let Some(k) = {
|
||||
let guard = self.cached_product_key.read().await;
|
||||
let res = guard.clone();
|
||||
drop(guard);
|
||||
res
|
||||
} {
|
||||
k
|
||||
} else {
|
||||
let k = Arc::new(get_product_key().await?);
|
||||
|
||||
Reference in New Issue
Block a user