报错后自动断开所有ws
This commit is contained in:
@@ -110,15 +110,10 @@ function NET.wsconn_stream()
|
||||
end
|
||||
|
||||
--Disconnect
|
||||
function NET.wsclose_user()
|
||||
WS.close("user")
|
||||
end
|
||||
function NET.wsclose_play()
|
||||
WS.close("play")
|
||||
end
|
||||
function NET.wsclose_stream()
|
||||
WS.close("stream")
|
||||
end
|
||||
function NET.wsclose_app()WS.close("app")end
|
||||
function NET.wsclose_user()WS.close("user")end
|
||||
function NET.wsclose_play()WS.close("play")end
|
||||
function NET.wsclose_stream()WS.close("stream")end
|
||||
|
||||
--Account & User
|
||||
function NET.register(username,email,password)
|
||||
|
||||
@@ -12,6 +12,10 @@ function scene.sceneInit()
|
||||
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."
|
||||
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
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user