Skip to content

Commit 51081e4

Browse files
authored
Merge pull request #4613 from LuckyPennySoftware/4612-automapper-1600-web-deploy-sometimes-fails-with-locked-automapperdll
Better async handling of license validation; fixes #4612
2 parents 6e084d3 + 24aa419 commit 51081e4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_dispatch:
89
env:
910
DOTNET_NOLOGO: true
1011
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true

src/AutoMapper/Licensing/LicenseAccessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private Claim[] ValidateKey(string licenseKey)
7171
ValidateLifetime = false
7272
};
7373

74-
var validateResult = handler.ValidateTokenAsync(licenseKey, parms).Result;
74+
var validateResult = Task.Run(() => handler.ValidateTokenAsync(licenseKey, parms)).GetAwaiter().GetResult();
7575
if (!validateResult.IsValid)
7676
{
7777
_logger.LogCritical(validateResult.Exception, "Error validating the Lucky Penny software license key");

0 commit comments

Comments
 (0)