# HG changeset patch # User Matthew Wild # Date 1592124008 -3600 # Node ID 558f0555ba02979320f93a39c4f7fe447c4ad524 # Parent 69a4b0e3565f7c9cbd08f2c039e2c80a4334eb3e util.async: Don't attempt to close thread if not created yet diff -r 69a4b0e3565f -r 558f0555ba02 util/async.lua --- 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");