diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-10 19:18:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-10 19:18:34 +0800 |
commit | 244d00ba67e30d28b9c835fc04a09ca3e98e9a20 (patch) | |
tree | f6f600c4c3076e7995dc9eb06938dfa5a0fa54d8 /script-beta | |
parent | e642773d31b415ff79c6a682486a3e7aaa2f8a86 (diff) | |
download | lua-language-server-244d00ba67e30d28b9c835fc04a09ca3e98e9a20.zip |
任务被提前中断时,视为执行成功
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/proto/proto.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script-beta/proto/proto.lua b/script-beta/proto/proto.lua index 7b6b0087..b70cc451 100644 --- a/script-beta/proto/proto.lua +++ b/script-beta/proto/proto.lua @@ -97,7 +97,8 @@ function m.doMethod(proto) await.create(function () log.debug('Start method:', method) local clock = os.clock() - local ok, res + local ok = true + local res -- 任务可能在执行过程中被中断,通过close来捕获 local response <close> = util.defer(function () local passed = os.clock() - clock |