修复一个错误

This commit is contained in:
MrZ626
2021-03-27 21:11:41 +08:00
parent c0155ad275
commit a3ff9dacc8

View File

@@ -77,9 +77,6 @@ do--Connect
code=l:find(" "); code=l:sub(code+1,code+3) code=l:find(" "); code=l:sub(code+1,code+3)
end end
if code=="101"then
readCHN:push("success")
else
local ctLen local ctLen
repeat repeat
l=SOCK:receive("*l") l=SOCK:receive("*l")
@@ -87,6 +84,9 @@ do--Connect
ctLen=tonumber(l:match"%d+") ctLen=tonumber(l:match"%d+")
end end
until l=="" until l==""
if code=="101"then
readCHN:push("success")
else
local reason=JSON.decode(SOCK:receive(ctLen)) local reason=JSON.decode(SOCK:receive(ctLen))
readCHN:push(code..":"..(reason and reason.message or"Server Error")) readCHN:push(code..":"..(reason and reason.message or"Server Error"))
end end