重连逻辑

This commit is contained in:
chenxi 2023-06-16 21:33:09 +08:00
parent 7aee1712ac
commit 1a07576816

View File

@ -220,6 +220,9 @@ function NetManager:connect(domain, port, callback, socketName)
if ok and pbData then
pbData.status = not pbData.err_code and 0 or ProtoMsgDispatch:getErrCodeEnum(pbData.err_code)
if pbData.status ~= 0 then
if msgName == "ReconnectRsp" then -- Reconnect失败就直接回登录界面
self:closeAll()
else
self:closeAndClear()
local accountInfo = LocalData:getAccountInfo()
local loginType
@ -255,6 +258,7 @@ function NetManager:connect(domain, port, callback, socketName)
}
GFunc.showMessageBox(params)
end
end
else
UIManager:hideWaitNet(true)