Browse Source

Fixed issue with TryAcquireAsync

pull/15817/head
Mark Cilia Vincenti 3 years ago
parent
commit
bf3111cb07
  1. 6
      framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLock.cs

6
framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLock.cs

@ -28,12 +28,6 @@ public class LocalAbpDistributedLock : IAbpDistributedLock, ISingletonDependency
Check.NotNullOrWhiteSpace(name, nameof(name));
var key = DistributedLockKeyNormalizer.NormalizeKey(name);
//if (timeout == default)
//{
// var releaser = await _localSyncObjects.LockAsync(key, cancellationToken);
// return new LocalAbpDistributedLockHandle(releaser);
//}
var timeoutReleaser = await _localSyncObjects.LockAsync(key, timeout, cancellationToken);
if (!timeoutReleaser.EnteredSemaphore)
{

Loading…
Cancel
Save