diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-06-14 09:40:08 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-06-14 09:40:08 +0100 |
commit | 020454b7a3afe41edcc365f593bffc97c827e962 (patch) | |
tree | 51d6e2ac54642a9efac0ec838c451027b17b3fb2 /util | |
parent | 3c53df784751cef688a5ff41db26d4d11b7da2f7 (diff) | |
download | prosody-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.lua | 2 |
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"); |