退出聊天室会断开连接
This commit is contained in:
@@ -25,6 +25,10 @@ function scene.sceneInit()
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function scene.sceneBack()
|
||||||
|
WSCONN=nil
|
||||||
|
end
|
||||||
|
|
||||||
function scene.keyDown(k)
|
function scene.keyDown(k)
|
||||||
if k=="return"then
|
if k=="return"then
|
||||||
sendMessage()
|
sendMessage()
|
||||||
|
|||||||
@@ -338,6 +338,7 @@ end
|
|||||||
function Tick.wsCONN_read()
|
function Tick.wsCONN_read()
|
||||||
while true do
|
while true do
|
||||||
yield()
|
yield()
|
||||||
|
if not WSCONN then return end
|
||||||
local messages,readErr=client.read(WSCONN)
|
local messages,readErr=client.read(WSCONN)
|
||||||
if messages then
|
if messages then
|
||||||
if messages[1]then
|
if messages[1]then
|
||||||
|
|||||||
Reference in New Issue
Block a user