From 9f39d0a3dde62dbe205ceb42c16bcc6fc95fc2bf Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 16 Dec 2020 05:18:58 +0300 Subject: [PATCH] minor fix... Signed-off-by: Alex A. Naanou --- runner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runner.js b/runner.js index 1731bbf..d890ccc 100644 --- a/runner.js +++ b/runner.js @@ -308,12 +308,13 @@ object.Constructor('Queue', Array, { : setTimeout(run, 0)) return this }, __onempty__: function(){ + var that = this this.poling_timeout != null ? // wait a bit then stop if still empty... setTimeout(function(){ that.length > 0 ? that.__run_tasks__() - : that.stop( + : that.stop() }, this.poling_timeout) // stop now... : this.stop()