aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
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
commit6b147cfc394830ac44dd5020d33e14a8876d151a (patch)
treeb0d3c6fe22163b7d338be1d3846288f14a1e4819 /util/async.lua
parent46a9b421420a80e448723a480a3b38128686d8a9 (diff)
downloadprosody-6b147cfc394830ac44dd5020d33e14a8876d151a.tar.gz
prosody-6b147cfc394830ac44dd5020d33e14a8876d151a.zip
util.async: Log warning when unexpected state is reached
Diffstat (limited to 'util/async.lua')
-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);