diff --git a/lib/utils/locker.js b/lib/utils/locker.js index c761ee28..0d8a1a3c 100644 --- a/lib/utils/locker.js +++ b/lib/utils/locker.js @@ -145,7 +145,7 @@ Locker.prototype.lock = function lock(arg1, arg2) { Locker.prototype.unlock = function unlock() { var job; - assert(this.busy); + assert(this.destroyed || this.busy); this.busy = false; this.current = null; @@ -353,7 +353,7 @@ MappedLock.prototype.unlock = function unlock(key) { var jobs = self.jobs[key]; var job; - assert(self.busy[key]); + assert(self.destroyed || self.busy[key]); delete self.busy[key]; if (!jobs)