From 583e479a805434bc7c9c89893b4ab2b81cd44754 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 21 Dec 2016 14:46:06 -0800 Subject: [PATCH] locker: fix destroy handling. --- lib/utils/locker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)