aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-03-17 17:28:07 +0000
committerMatthew Wild <mwild1@gmail.com>2018-03-17 17:28:07 +0000
commitf0d4a5254e293caa9995dc7f28ac2c43a68b9d89 (patch)
treeba0e2d77d6915d76cae53d08f22749679b773f2c /util/async.lua
parent3148c6b4f70a43bf3616bd967c02f51297a3f640 (diff)
downloadprosody-f0d4a5254e293caa9995dc7f28ac2c43a68b9d89.tar.gz
prosody-f0d4a5254e293caa9995dc7f28ac2c43a68b9d89.zip
util.async: ensure change in e77b37de482e applies after out-of-loop resume also
Diffstat (limited to 'util/async.lua')
-rw-r--r--util/async.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/async.lua b/util/async.lua
index 8756c81a..9189e6d1 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -32,8 +32,7 @@ local function runner_continue(thread)
if error_handler then error_handler(runner, debug.traceback(thread, err)); end
local ready_handler = runner.watchers.ready;
runner.state, runner.thread = "ready", nil;
- if ready_handler then ready_handler(runner); end
- runner.notified_state = "ready";
+ return runner:run();
elseif state == "ready" then
-- If state is 'ready', it is our responsibility to update runner.state from 'waiting'.
-- We also have to :run(), because the queue might have further items that will not be