|
@@ -482,13 +482,21 @@ ComontAlretViewControllerDelegate>
|
|
|
|
|
|
if(self.commandChannelManager){
|
|
|
|
|
|
- HLog(@"WebSocket 链接时已经存在");
|
|
|
- [self.commandChannelManager rc_close];
|
|
|
-
|
|
|
- self.commandChannelManager = nil;
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- [self opencommandChannelManagerrc_openURL];
|
|
|
- });
|
|
|
+ if([self.commandChannelManager rc_socketStatus] == RCSocketCloudPhoneStatusConnected
|
|
|
+ ||[self.commandChannelManager rc_socketStatus] == RCSocketCloudPhoneStatusReceived){
|
|
|
+ //链接中不处理
|
|
|
+ HLog(@"WebSocket 链接时已经存在并且链接中");
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ HLog(@"WebSocket 链接时已经存在并且链接失效");
|
|
|
+
|
|
|
+ [self.commandChannelManager rc_close];
|
|
|
+
|
|
|
+ self.commandChannelManager = nil;
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ [self opencommandChannelManagerrc_openURL];
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
return;
|
|
|
}
|