summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-28 17:41:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-28 17:41:28 +0800
commit2224a94a9f0be14a97f8f6d51cacc33341f8670c (patch)
tree4c7c46beca20a4b87dd41a584ace3e318d7d7ee9 /server
parent7073207a8de4491c598b56d19497f78935027022 (diff)
downloadlua-language-server-2224a94a9f0be14a97f8f6d51cacc33341f8670c.zip
保护一下计时器
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index ecb91554..1145b210 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -725,7 +725,11 @@ function mt:listen()
local delta = os.clock() - clock
clock = os.clock()
- updateTimer(delta)
+ local suc, err = xpcall(updateTimer, log.error, delta)
+ if not suc then
+ io.stderr:write(err)
+ io.stderr:flush()
+ end
thread.sleep(0.001)
end
end