summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-19 17:37:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-19 17:37:00 +0800
commit3bbdc98ecb931a86a89e9922cf6be138d16b8a34 (patch)
tree2ad63975b6d02314f45bad8bc7db058b80170243
parent3103b678842d530e8d4cf81f4335fd210dd3114d (diff)
downloadlua-language-server-3bbdc98ecb931a86a89e9922cf6be138d16b8a34.zip
fix
-rw-r--r--script/await.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/script/await.lua b/script/await.lua
index 81b44679..2d27ae2c 100644
--- a/script/await.lua
+++ b/script/await.lua
@@ -86,8 +86,10 @@ function m.close(id)
return
end
for co in pairs(map) do
- map[co] = nil
- coroutine.close(co)
+ if coroutine.status(co) == 'suspended' then
+ map[co] = nil
+ coroutine.close(co)
+ end
end
end