diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-05-22 18:12:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-05-22 18:12:58 +0800 |
commit | 2c2cf2922706822b9a503b8de7e2837d5b79b772 (patch) | |
tree | 2e5b5bb4ce0bab03e7c0dbd51a0df9bfb4f95506 /script/proto/proto.lua | |
parent | d8f2ce4a7e7068f0d81cd48a4589226eec249415 (diff) | |
download | lua-language-server-2c2cf2922706822b9a503b8de7e2837d5b79b772.zip |
use `detach` to avoid reffing
Diffstat (limited to 'script/proto/proto.lua')
-rw-r--r-- | script/proto/proto.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/script/proto/proto.lua b/script/proto/proto.lua index 7a196c35..73544ffc 100644 --- a/script/proto/proto.lua +++ b/script/proto/proto.lua @@ -241,10 +241,9 @@ function m.listen(mode, socketPort) rfd:connect('127.0.0.1', socketPort) local wfd1, wfd2 = socket.pair() m.fd = wfd1 - m.fdRefs = { rfd, wfd1, wfd2 } pub.task('loadProtoBySocket', { - wfd = wfd2:handle(), - rfd = rfd:handle(), + wfd = wfd2:detach(), + rfd = rfd:detach(), }) end end |