Browse Source

1.修复之前未连接弹框只谈一次的问题

huangxiaodong 1 year ago
parent
commit
0f40920efe

+ 4 - 3
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -241,9 +241,10 @@ ComontAlretViewControllerDelegate>
     
     _checkThridConnectNum += 1;
     
-    if(_checkThridConnectNum == 30 && [[connectDeviceManager shareInstance] curConnectDeviceState] <= 3 ){
+    if(_checkThridConnectNum >= 30 && [[connectDeviceManager shareInstance] curConnectDeviceState] <= 3 ){
         [self showNetErrorAlertFun:11];
         
+        _checkThridConnectNum = 0;
 //        [_checkThridConnectTimer invalidate];
 //        return;
     }
@@ -2162,13 +2163,14 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
 
 - (void)tryAgainInLinkFailFun
 {
+    linkFailAlretVC = nil;
     
     if([[connectDeviceManager shareInstance] curConnectDeviceState] <= 3)
     {
         //瑞云发起重连
         NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
         if(snStr){
-            _checkThridConnectNum = 1;
+            //_checkThridConnectNum = 1;
             [[connectDeviceManager shareInstance] getThridMsgBySN:snStr needReconnect:YES didNetEnd:^(NSInteger didSuc) {
             }];
         }
@@ -2179,7 +2181,6 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     reConnectAccount = 0;
     [self tryAgain];
     
-    linkFailAlretVC = nil;
 }
 
 BOOL inReconnect = NO;