超时重连增加条件编译
This commit is contained in:
parent
d5ea26f15c
commit
68688c9daf
@ -95,12 +95,14 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
onlineUserHelper.SetOnlineUser(new List<ReceiveMsgModel>());
|
onlineUserHelper.SetOnlineUser(new List<ReceiveMsgModel>());
|
||||||
}
|
}
|
||||||
|
#if UNITY_IOS
|
||||||
//超过5s没收到消息断开重连一次
|
//超过5s没收到消息断开重连一次
|
||||||
if ((now - LastActiveTime).TotalSeconds > 5)
|
if ((now - LastActiveTime).TotalSeconds > 5)
|
||||||
{
|
{
|
||||||
LastActiveTime = now;
|
LastActiveTime = now;
|
||||||
_udpService.Disconnect();
|
_udpService.Disconnect();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (now.Second % 20 == 0)
|
if (now.Second % 20 == 0)
|
||||||
{
|
{
|
||||||
//LastActiveTime = now;
|
//LastActiveTime = now;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user