加载时连接ws-app
This commit is contained in:
@@ -1112,7 +1112,6 @@ do
|
||||
]]
|
||||
|
||||
function TICK_WS_app()
|
||||
local initial=true
|
||||
local retryTime=5
|
||||
while true do
|
||||
YIELD()
|
||||
@@ -1142,10 +1141,7 @@ do
|
||||
elseif status=="dead"then
|
||||
retryTime=retryTime-1
|
||||
if retryTime==0 then return end
|
||||
if initial then
|
||||
for _=1,120 do YIELD()end
|
||||
initial=false
|
||||
end
|
||||
for _=1,120 do YIELD()end
|
||||
WS.connect("app","/app")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -180,7 +180,7 @@ local loadingThread=coroutine.create(function()
|
||||
--Connect to server
|
||||
TASK.new(TICK_WS_app)
|
||||
TASK.new(TICK_WS_user)
|
||||
TASK.new(TICK_WS_chat)
|
||||
WS.connect("app","/app")
|
||||
if USER.authToken then
|
||||
WS.connect("user","/user",JSON.encode{
|
||||
id=USER.id,
|
||||
|
||||
Reference in New Issue
Block a user