diff --git a/src/core/shared/utils.rs b/src/core/shared/utils.rs index 9d93a06b..c8f27a41 100644 --- a/src/core/shared/utils.rs +++ b/src/core/shared/utils.rs @@ -53,7 +53,7 @@ pub async fn get_database_url() -> Result { pub fn get_database_url_sync() -> Result { let guard = SECRETS_MANAGER.read().map_err(|e| anyhow::anyhow!("Lock poisoned: {}", e))?; if let Some(ref manager) = *guard { - if let Ok(handle) = tokio::runtime::Handle::try_current() { + if tokio::runtime::Handle::try_current().is_ok() { return tokio::task::block_in_place(|| { let rt = tokio::runtime::Builder::new_current_thread() .enable_all()