From 59ef90e12045bfaf821eaa0be1c992e7f28a98ea Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 30 May 2021 16:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88NET.connected=E5=8F=98?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/net.lua | 2 -- parts/scenes/main.lua | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/parts/net.lua b/parts/net.lua index f3837270..8a3e5bd7 100644 --- a/parts/net.lua +++ b/parts/net.lua @@ -5,7 +5,6 @@ local WS,TIME=WS,TIME local yield=YIELD local NET={ - connected=false, allow_online=false, accessToken=false, roomList={},--Local roomlist, updated frequently @@ -309,7 +308,6 @@ function NET.updateWS_app() local res=_parse(message) if res then if res.type=='Connect'then - NET.connected=true if VERSION.code>=res.lowest then NET.allow_online=true if USER.authToken then diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 82008924..d4312ca8 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -63,7 +63,7 @@ function scene.keyDown(key) end elseif key=="a"then if testButton(3)then - if NET.connected then + if WS.status('app')=='running'then NET.tryLogin(false) else NET.wsconn_app()