diff options
author | uhziel <uhziel@gmail.com> | 2020-12-14 11:10:03 +0800 |
---|---|---|
committer | uhziel <uhziel@gmail.com> | 2020-12-14 11:10:03 +0800 |
commit | f05b8a9b522989e83f28ce0511d5468d7300b40d (patch) | |
tree | 56b515671335acb8fc63709529deda255497a47c /script/proto | |
parent | cbacf3202f6162073aad1433ef0197b7b16f79bc (diff) | |
parent | 035f4393ab98b0de30650af94375d9c5e2fe07c1 (diff) | |
download | lua-language-server-f05b8a9b522989e83f28ce0511d5468d7300b40d.zip |
合并 master 中的提交
Diffstat (limited to 'script/proto')
-rw-r--r-- | script/proto/proto.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/proto/proto.lua b/script/proto/proto.lua index a0758ac3..944268c2 100644 --- a/script/proto/proto.lua +++ b/script/proto/proto.lua @@ -106,7 +106,7 @@ function m.doMethod(proto) local ok = true local res -- 任务可能在执行过程中被中断,通过close来捕获 - local response <close> = util.defer(function () + local response <close> = function () local passed = os.clock() - clock if passed > 0.2 then log.debug(('Method [%s] takes [%.3f]sec.'):format(method, passed)) @@ -120,7 +120,7 @@ function m.doMethod(proto) else m.responseErr(proto.id, define.ErrorCodes.InternalError, res) end - end) + end ok, res = xpcall(abil, log.error, proto.params) end) end |