Software /
code /
prosody
Diff
util/async.lua @ 8616:a15c891c6232
util.async: ensure change in e77b37de482e applies after out-of-loop resume also
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 17 Mar 2018 17:28:07 +0000 |
parent | 8615:e77b37de482e |
child | 8625:08bf4df6fdb7 |
line wrap: on
line diff
--- a/util/async.lua Sat Mar 17 14:54:48 2018 +0000 +++ b/util/async.lua Sat Mar 17 17:28:07 2018 +0000 @@ -32,8 +32,7 @@ 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