summaryrefslogtreecommitdiff
path: root/server-beta/src/proto
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-24 15:57:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-24 15:57:07 +0800
commitd3747e09567909eed1917c65b19eeef24315e3dd (patch)
tree9af9d4a18acae7db430fa59dd98168524439e820 /server-beta/src/proto
parent4b302ec2e5aeb7a1a878989bd99c53f7f8eb84dd (diff)
downloadlua-language-server-d3747e09567909eed1917c65b19eeef24315e3dd.zip
读取协议是常驻任务
Diffstat (limited to 'server-beta/src/proto')
-rw-r--r--server-beta/src/proto/proto.lua11
1 files changed, 1 insertions, 10 deletions
diff --git a/server-beta/src/proto/proto.lua b/server-beta/src/proto/proto.lua
index cc9988a8..27ba68b8 100644
--- a/server-beta/src/proto/proto.lua
+++ b/server-beta/src/proto/proto.lua
@@ -112,16 +112,7 @@ function m.listen()
subprocess.filemode(io.stdout, 'b')
io.stdin:setvbuf 'no'
io.stdout:setvbuf 'no'
- task.create(function ()
- while true do
- local proto = pub.task('loadProto')
- if proto.method then
- m.doMethod(proto)
- else
- m.doResponse(proto)
- end
- end
- end)
+ pub.syncTask('loadProto')
end
return m