mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-24 16:53:10 +08:00
Remove lock from the dictionary when the task has completed. (#8395)
Fixes #8391
This commit is contained in:
@@ -104,6 +104,7 @@ namespace Orchard.Tasks.Locking.Services {
|
||||
Logger.Debug("Record for lock '{0}' already owned by current machine or was successfully created; creating lock object.", internalName);
|
||||
|
||||
dLock = new DistributedLock(name, internalName, releaseLockAction: () => {
|
||||
_locks.Remove(monitorObj);
|
||||
Monitor.Exit(monitorObj);
|
||||
DeleteDistributedLockRecord(internalName);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user