Procházet zdrojové kódy

1.单点登录 重新登录后还能收到单点登录消息问题

huangxiaodong před 1 rokem
rodič
revize
69cf6853d6

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

@@ -381,6 +381,11 @@ ComontAlretViewControllerDelegate>
 
 - (void)opencommandChannelManagerrc_openURL
 {
+    
+    if(self.commandChannelManager){
+        [self.commandChannelManager rc_close];
+    }
+    
     KWeakSelf
     //初始化指令通道
     self.commandChannelManager = [[RCCommandChannelManager alloc] init];
@@ -394,10 +399,10 @@ ComontAlretViewControllerDelegate>
         HLog(@"WebSocket11111指令通道连接开始11111 url = %@ ",instructionsChannelUrl);
         [self.commandChannelManager rc_openURL:instructionsChannelUrl connected:^{
             HLog(@"WebSocket11111指令通道连接成功11111 url = %@ ",instructionsChannelUrl);
-            if (self.commandChannelManager.rc_socketStatus == RCSocketCloudPhoneStatusConnected){
+            if (weakSelf.commandChannelManager.rc_socketStatus == RCSocketCloudPhoneStatusConnected){
                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                     
-                    [self fristConnectNeedGiveAMsgFun];
+                    [weakSelf fristConnectNeedGiveAMsgFun];
                     
 //                    /*获取自己的用户名(电话号码)*/
 //                    NSString *selfUseName = nil;