mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-24 16:53:10 +08:00
Update DistributedLockService.cs (#8398)
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Orchard.Tasks.Locking.Services {
|
||||
return true;
|
||||
}
|
||||
|
||||
Logger.Warning("Failed to acquire lock '{0}' within the specified timeout ({1}).", name, timeout);
|
||||
Logger.Debug("Failed to acquire lock '{0}' within the specified timeout ({1}).", name, timeout);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Logger.Error(ex, "Error while trying to acquire lock '{0}'.", name);
|
||||
@@ -112,7 +112,6 @@ namespace Orchard.Tasks.Locking.Services {
|
||||
_locks.Add(monitorObj, dLock);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -121,7 +120,9 @@ namespace Orchard.Tasks.Locking.Services {
|
||||
|
||||
if (throwOnTimeout)
|
||||
throw new TimeoutException(String.Format("Failed to acquire lock '{0}' within the specified timeout ({1}).", internalName, timeout));
|
||||
|
||||
else
|
||||
Monitor.Exit(monitorObj);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user