network 修改
parent
7ce382f413
commit
19b985afc3
|
@ -69,7 +69,8 @@ function Network:OnDisconnect(err)
|
|||
RequestPanel.Show(Language[12111])--..err)
|
||||
self.socket:TryReconnect()
|
||||
self.ReconnectTime= Time.time
|
||||
Game.Logout()
|
||||
|
||||
--Game.Logout()
|
||||
end
|
||||
|
||||
function Network:SendClientHeartBeat()
|
||||
|
@ -100,7 +101,7 @@ function Network:OnReconnect()
|
|||
end)
|
||||
|
||||
coroutine.start(function()
|
||||
coroutine.wait(3)
|
||||
coroutine.wait(4)
|
||||
|
||||
if not self.isConnected then
|
||||
Log("没有收到 重连信息,重新设置链接!!")
|
||||
|
@ -123,7 +124,7 @@ end
|
|||
--重连3次失败
|
||||
function Network:OnReconnectFail()
|
||||
-- 重连时间超过30秒强制回到登录界面
|
||||
if Time.time - self.ReconnectTime > 30 then
|
||||
if Time.time - self.ReconnectTime > 60 then
|
||||
-- SysPanel.ShowTwo(Language[12235], function()
|
||||
-- Game.Logout()
|
||||
-- end, Language[12117])
|
||||
|
|
Loading…
Reference in New Issue