Browse Source

1.洪研手机连接异常处理

huangxiaodong 10 months ago
parent
commit
5cde9f9426

+ 10 - 1
创维盒子/双子星云手机/cloudPhone/websocket/webSocketManager.m

@@ -95,10 +95,19 @@ static webSocketManager *webSocketManagerInstance = nil;
         _curIp = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.ip;
         wsPort = @"9300";
     }
-    else{
+    else if([connectDeviceManager shareInstance].tcpPortStr
+            &&[connectDeviceManager shareInstance].tcpPortStr.length > 0) {
         _curIp = ruiyunlinkIp;
         wsPort = [[connectDeviceManager shareInstance] tcpPortStr];
     }
+    else{
+        //
+        HLog(@"非内网而且瑞云未链接完成");
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [weakSelf opencommandChannelManagerrc_openURL];
+        });
+        return;
+    }
     
     NSString *instructionsChannelUrl = [NSString stringWithFormat:@"ws://%@:%@/businessChannel",_curIp,wsPort];