|
@@ -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;
|