aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-03-16 17:12:36 +0000
committerMatthew Wild <mwild1@gmail.com>2018-03-16 17:12:36 +0000
commit99d071b9f8d7d0e12c80ebe9baed4368411d6103 (patch)
treee9207d1879dc19a4a8020f17975d2dbe3357ed0e
parent359f425e7178855ec096452338896595a4f16a6f (diff)
downloadprosody-99d071b9f8d7d0e12c80ebe9baed4368411d6103.tar.gz
prosody-99d071b9f8d7d0e12c80ebe9baed4368411d6103.zip
util.async: Bugfix, don't continue main loop while there is a pending error
-rw-r--r--util/async.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/async.lua b/util/async.lua
index e5f12f28..13ab73af 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -129,7 +129,7 @@ function runner_mt:run(input)
local n, state, err = #q, self.state, nil;
self.state = "running";
self:log("debug", "running main loop");
- while n > 0 and state == "ready" do
+ while n > 0 and state == "ready" and not err do
local consumed;
-- Loop through queue items, and attempt to run them
for i = 1,n do