From 7d89676df69c50713ae3ef99952d964648b0f92b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 7 Dec 2020 21:34:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8socketRead=E4=BA=8B=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/tick.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/parts/tick.lua b/parts/tick.lua index 5b4b0f0d..7e6b7d02 100644 --- a/parts/tick.lua +++ b/parts/tick.lua @@ -45,8 +45,12 @@ local function tick_wsCONN_read() if not WSCONN then return end local messages,readErr=client.read(WSCONN) if messages then - for i=1,#messages do - SCN.socketRead(messages[i]) + if SCN.socketRead then + for i=1,#messages do + SCN.socketRead(messages[i]) + end + else + return end elseif readErr then wsWrite("/quit")