summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/enterprise.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/src/enterprise.rs b/rust/src/enterprise.rs
index 34fa8a03..aecbf974 100644
--- a/rust/src/enterprise.rs
+++ b/rust/src/enterprise.rs
@@ -25,6 +25,10 @@ pub fn checkout_license(duration: Duration) -> Result<(), EnterpriseCheckoutErro
return Ok(());
}
+ // The disparate core functions we call here might already have mutexes to guard.
+ static CHECKOUT_MUTEX: std::sync::Mutex<()> = std::sync::Mutex::new(());
+ let _mtx = CHECKOUT_MUTEX.lock().unwrap();
+
#[allow(clippy::collapsible_if)]
if !is_server_initialized() {
// We need to first initialize the server.