summaryrefslogtreecommitdiff
path: root/script-beta/await.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/await.lua')
-rw-r--r--script-beta/await.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/await.lua b/script-beta/await.lua
index a26adff8..a718dbb6 100644
--- a/script-beta/await.lua
+++ b/script-beta/await.lua
@@ -100,6 +100,9 @@ function m.sleep(time)
end
local co = coroutine.running()
timer.wait(time, function ()
+ if coroutine.status(co) == 'dead' then
+ return
+ end
return m.checkResult(co, coroutine.resume(co))
end)
return coroutine.yield()