Software /
code /
prosody
Diff
util/async.lua @ 8601:ce5b16e13573
util.async: Log warning when unexpected state is reached
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 16 Mar 2018 17:11:23 +0000 |
parent | 8600:96f20cf92b84 |
child | 8602:9901deadc068 |
line wrap: on
line diff
--- a/util/async.lua Fri Mar 16 14:59:41 2018 +0000 +++ b/util/async.lua Fri Mar 16 17:11:23 2018 +0000 @@ -12,6 +12,7 @@ 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);