aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-03-16 17:11:23 +0000
committerMatthew Wild <mwild1@gmail.com>2018-03-16 17:11:23 +0000
commita19c168d25b5980b4cf33777684405a74511b934 (patch)
treeb0d3c6fe22163b7d338be1d3846288f14a1e4819
parentf22ee7eef685f6f569173e8133994966329551dc (diff)
downloadprosody-a19c168d25b5980b4cf33777684405a74511b934.tar.gz
prosody-a19c168d25b5980b4cf33777684405a74511b934.zip
util.async: Log warning when unexpected state is reached
-rw-r--r--util/async.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/async.lua b/util/async.lua
index 3934691b..eac74c1d 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -12,6 +12,7 @@ end
local function runner_continue(thread)
-- ASSUMPTION: runner is in 'waiting' state (but we don't have the runner to know for sure)
if coroutine.status(thread) ~= "suspended" then -- This should suffice
+ log("warn", "unexpected async state: thread not suspended");
return false;
end
local ok, state, runner = coroutine.resume(thread);