websocket断线重连的问题
This commit is contained in:
parent
b31d97d880
commit
c236997ae9
@ -252,7 +252,7 @@ public class NetworkMgr : Singleton<NetworkMgr>
|
||||
gameSrv.CustomUpdate();
|
||||
|
||||
// 发送心跳包
|
||||
if (gameSrv.CanSendPing() && (Time.realtimeSinceStartup - mLastHeartTime >= 1.0f))
|
||||
if ((Time.realtimeSinceStartup - mLastHeartTime >= 1.0f))
|
||||
{
|
||||
mLastHeartTime = Time.realtimeSinceStartup;
|
||||
if (mHeartAckWaitNum == 0)
|
||||
@ -260,8 +260,9 @@ public class NetworkMgr : Singleton<NetworkMgr>
|
||||
mLastHeartTimeWait = Time.realtimeSinceStartup;
|
||||
}
|
||||
mHeartAckWaitNum++;
|
||||
|
||||
//todo 处理心跳消息的发送
|
||||
SendPing();
|
||||
if (gameSrv.CanSendPing()) SendPing();
|
||||
}
|
||||
|
||||
gameSrv.HandleSending();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user