diff --git a/src/Raven.Server/RavenServer.cs b/src/Raven.Server/RavenServer.cs index c37061a9f167..faf49a408681 100644 --- a/src/Raven.Server/RavenServer.cs +++ b/src/Raven.Server/RavenServer.cs @@ -3009,7 +3009,7 @@ internal static void VerifyLicense(StorageEnvironment storageEnvironment, Server var localLicenseStatus = LicenseManager.GetLicenseStatus(localLicense); if (localLicenseStatus.Expiration >= RavenVersionAttribute.Instance.ReleaseDate) { - serverStore.LicenseManager.OnBeforeInitialize += () => serverStore.LicenseManager.TryActivateLicenseAsync(throwOnActivationFailure: serverStore.Server.ThrowOnLicenseActivationFailure).Wait(serverStore.ServerShutdown); + serverStore.LicenseManager.OnBeforeInitialize += () => AsyncHelpers.RunSync(() => serverStore.LicenseManager.TryActivateLicenseAsync(throwOnActivationFailure: serverStore.Server.ThrowOnLicenseActivationFailure)); return; }