diff options
author | CppCXY <812125110@qq.com> | 2022-08-11 19:36:36 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2022-08-11 19:36:36 +0800 |
commit | ff9103ae4001d8e520171b99cd192997fc689bc9 (patch) | |
tree | 04c0b685e81aac48210604dc12d24b91862a36d9 /script/service | |
parent | 40f191a85ea21bb64c427f9dab4bc597e2a0ea1b (diff) | |
parent | 82bcfef9037c26681993c94b2f92b68d335de3c6 (diff) | |
download | lua-language-server-ff9103ae4001d8e520171b99cd192997fc689bc9.zip |
Merge branch 'master' of github.com:CppCXY/lua-language-server
Diffstat (limited to 'script/service')
-rw-r--r-- | script/service/service.lua | 2 | ||||
-rw-r--r-- | script/service/telemetry.lua | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/script/service/service.lua b/script/service/service.lua index 26790c63..07612d7b 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -235,7 +235,7 @@ end function m.testVersion() local stack = debug.setcstacklimit(200) debug.setcstacklimit(stack + 1) - if debug.setcstacklimit(stack) == stack + 1 then + if type(stack) == 'number' and debug.setcstacklimit(stack) == stack + 1 then proto.notify('window/showMessage', { type = 2, message = 'It seems to be running in Lua 5.4.0 or Lua 5.4.1 . Please upgrade to Lua 5.4.2 or above. Otherwise, it may encounter weird "C stack overflow", resulting in failure to work properly', diff --git a/script/service/telemetry.lua b/script/service/telemetry.lua index 2e52def2..211dff0e 100644 --- a/script/service/telemetry.lua +++ b/script/service/telemetry.lua @@ -90,6 +90,7 @@ local function pushErrorLog(link) )) end +---@type boolean? local isValid = false timer.wait(5, function () |