summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-27 15:03:17 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-27 15:03:17 +0800
commitb6a0f2e122d6821ce211ccd0f8c73bf95d0f7491 (patch)
tree7ab9c5a6286136814852688cdaf1f243b65a477b /server/src/core
parentfcd29ea768e014a2284c3e991a0310b3708b6408 (diff)
downloadlua-language-server-b6a0f2e122d6821ce211ccd0f8c73bf95d0f7491.zip
统计持有函数
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/diagnostics.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua
index 7ebe297a..241d70ba 100644
--- a/server/src/core/diagnostics.lua
+++ b/server/src/core/diagnostics.lua
@@ -245,7 +245,11 @@ function mt:doDiagnostics(func, code, callback)
self.datas[#self.datas+1] = data
end)
if coroutine.isyieldable() then
- coroutine.yield()
+ if self.vm:isRemoved() then
+ coroutine.yield('stop')
+ else
+ coroutine.yield()
+ end
end
end