From c3e45a2a53fbe691268d92672bd1b5d7a4dc2c0e Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 3 Apr 2016 03:22:04 -0700 Subject: [PATCH] fix for locker. --- lib/bcoin/locker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bcoin/locker.js b/lib/bcoin/locker.js index 76174d96..3f90875f 100644 --- a/lib/bcoin/locker.js +++ b/lib/bcoin/locker.js @@ -92,7 +92,8 @@ Locker.prototype.lock = function lock(func, args, force) { }; Locker.prototype.destroy = function destroy() { - this.purgePending(); + if (this.add) + this.purgePending(); this.jobs.length = 0; };