Software /
code /
prosody
Changeset
10931:558f0555ba02
util.async: Don't attempt to close thread if not created yet
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 14 Jun 2020 09:40:08 +0100 |
parents | 10930:69a4b0e3565f |
children | 10932:ea4a7619058f |
files | util/async.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/async.lua Sun Jun 14 08:49:32 2020 +0100 +++ b/util/async.lua Sun Jun 14 09:40:08 2020 +0100 @@ -160,7 +160,7 @@ 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");