aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-06-14 09:40:08 +0100
committerMatthew Wild <mwild1@gmail.com>2020-06-14 09:40:08 +0100
commit020454b7a3afe41edcc365f593bffc97c827e962 (patch)
tree51d6e2ac54642a9efac0ec838c451027b17b3fb2 /util
parent3c53df784751cef688a5ff41db26d4d11b7da2f7 (diff)
downloadprosody-020454b7a3afe41edcc365f593bffc97c827e962.tar.gz
prosody-020454b7a3afe41edcc365f593bffc97c827e962.zip
util.async: Don't attempt to close thread if not created yet
Diffstat (limited to 'util')
-rw-r--r--util/async.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/async.lua b/util/async.lua
index 24378d8c..341128d2 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -160,7 +160,7 @@ function runner_mt:run(input)
local q, thread = self.queue, self.thread;
if not thread or coroutine.status(thread) == "dead" then
--luacheck: ignore 143/coroutine
- if coroutine.close then
+ if thread and coroutine.close then
coroutine.close(thread);
end
self:log("debug", "creating new coroutine");