diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-24 17:29:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-24 17:29:48 +0800 |
commit | 91612e9312a93c16be5b86f3168abe5b006f3bda (patch) | |
tree | 305e90753b3d6066958f6a8332d0db16df76c3c2 /script/service/telemetry.lua | |
parent | 65aac0a4e58252a91394c7d249efa78182d63f2f (diff) | |
download | lua-language-server-91612e9312a93c16be5b86f3168abe5b006f3bda.zip |
pcall connect
Diffstat (limited to 'script/service/telemetry.lua')
-rw-r--r-- | script/service/telemetry.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/script/service/telemetry.lua b/script/service/telemetry.lua index f4dda16d..f9b37507 100644 --- a/script/service/telemetry.lua +++ b/script/service/telemetry.lua @@ -64,7 +64,13 @@ timer.wait(5, function () if not config.config.telemetry.enable then return end - local link = net.connect('tcp', 'moe-loli.love', 11577) + local suc, link = xpcall(net.connect, log.error, 'tcp', 'moe-loli.love', 11577) + if not suc then + suc, link = xpcall(net.connect, log.error, 'tcp', '119.45.194.183', 11577) + end + if not suc then + return + end function link:on_connect() pushClientInfo(link) pushPlatformInfo(link) |