From 68688c9daf208f6149f5601c498cd846e8ac0fc7 Mon Sep 17 00:00:00 2001 From: lishuo Date: Tue, 23 Nov 2021 09:33:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E6=97=B6=E9=87=8D=E8=BF=9E=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9D=A1=E4=BB=B6=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs b/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs index 00950195..9d492fb2 100644 --- a/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs +++ b/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs @@ -95,12 +95,14 @@ namespace Assets.Scenes.Ride.Scripts { onlineUserHelper.SetOnlineUser(new List()); } +#if UNITY_IOS //超过5s没收到消息断开重连一次 if ((now - LastActiveTime).TotalSeconds > 5) { LastActiveTime = now; _udpService.Disconnect(); } +#endif if (now.Second % 20 == 0) { //LastActiveTime = now;