报错后自动断开所有ws
This commit is contained in:
@@ -110,15 +110,10 @@ function NET.wsconn_stream()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Disconnect
|
--Disconnect
|
||||||
function NET.wsclose_user()
|
function NET.wsclose_app()WS.close("app")end
|
||||||
WS.close("user")
|
function NET.wsclose_user()WS.close("user")end
|
||||||
end
|
function NET.wsclose_play()WS.close("play")end
|
||||||
function NET.wsclose_play()
|
function NET.wsclose_stream()WS.close("stream")end
|
||||||
WS.close("play")
|
|
||||||
end
|
|
||||||
function NET.wsclose_stream()
|
|
||||||
WS.close("stream")
|
|
||||||
end
|
|
||||||
|
|
||||||
--Account & User
|
--Account & User
|
||||||
function NET.register(username,email,password)
|
function NET.register(username,email,password)
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ function scene.sceneInit()
|
|||||||
stateInfo=SYSTEM.."-"..VERSION.string.." scene:"..ERRDATA[#ERRDATA].scene
|
stateInfo=SYSTEM.."-"..VERSION.string.." scene:"..ERRDATA[#ERRDATA].scene
|
||||||
errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author."
|
errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author."
|
||||||
errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes
|
errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes
|
||||||
|
NET.wsclose_app()
|
||||||
|
NET.wsclose_user()
|
||||||
|
NET.wsclose_play()
|
||||||
|
NET.wsclose_stream()
|
||||||
if SETTING then SFX.fplay("error",SETTING.voc*.8 or 0)end
|
if SETTING then SFX.fplay("error",SETTING.voc*.8 or 0)end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user