summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-28 11:29:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-28 11:29:15 +0800
commitb5b11853e543e8da30270bd25fbc9376c20fc398 (patch)
treeec0390642d491fea9184804ba09310552ee43be6 /server
parenteeb15fae07ac0d2ab4fcb8afd3a15516401034bd (diff)
downloadlua-language-server-b5b11853e543e8da30270bd25fbc9376c20fc398.zip
只在空闲时测试内存
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index 83f4aa0c..ecb91554 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -703,7 +703,7 @@ end
function mt:onTick()
self:_loadProto()
self:_doCompileTask()
- if os.clock() - self._clock >= 60 then
+ if os.clock() - self._clock >= 60 and not self:isWaitingCompile() then
self._clock = os.clock()
self:_testMemory()
end