improve license key check

This commit is contained in:
Ruben Fiszel
2023-09-28 04:58:44 +02:00
parent 93f536c26a
commit 1dffd5dc7b
+6
View File
@@ -324,6 +324,12 @@ pub async fn monitor_db<R: rsmq_async::RsmqConnection + Send + Sync + Clone + 's
tracing::error!("Error verifying license key: {:?}", e);
let mut l = LICENSE_KEY_VALID.write().await;
*l = false;
} else {
let is_valid = LICENSE_KEY_VALID.read().await.clone();
if !is_valid {
let mut l = LICENSE_KEY_VALID.write().await;
*l = true;
}
}
};