diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-28 17:41:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-28 17:41:28 +0800 |
commit | 2224a94a9f0be14a97f8f6d51cacc33341f8670c (patch) | |
tree | 4c7c46beca20a4b87dd41a584ace3e318d7d7ee9 /server | |
parent | 7073207a8de4491c598b56d19497f78935027022 (diff) | |
download | lua-language-server-2224a94a9f0be14a97f8f6d51cacc33341f8670c.zip |
保护一下计时器
Diffstat (limited to 'server')
-rw-r--r-- | server/src/service.lua | 6 |
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 |