|
|
@@ -128,6 +128,10 @@ static connectDeviceManager *connectDeviceManagerInstance = nil;
|
|
|
//
|
|
|
bool connected = [RaylinkProxy.sharedManager isSdnConnected];
|
|
|
if(!connected || needReconnect){
|
|
|
+ self->didPingType = NO;
|
|
|
+ self->didRuiyunLinkType = NO;
|
|
|
+ self->_isPingOk = NO;
|
|
|
+
|
|
|
weakSelf.curConnectDeviceState = DeviceConnectGetThridOK;
|
|
|
NSString *ipStr = weakSelf.DeviceThirdIdMod.data.ip;
|
|
|
[weakSelf startPingDeviceIp:ipStr];
|
|
|
@@ -621,6 +625,21 @@ static connectDeviceManager *connectDeviceManagerInstance = nil;
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
|
|
|
+ //切换设备
|
|
|
+ if([[webSocketManager shareInstance].commandChannelManager rc_socketStatus] == RCSocketCloudPhoneStatusConnected
|
|
|
+ ||[[webSocketManager shareInstance].commandChannelManager rc_socketStatus] == RCSocketCloudPhoneStatusReceived){
|
|
|
+
|
|
|
+ [[webSocketManager shareInstance].commandChannelManager rc_close];
|
|
|
+ [webSocketManager shareInstance].commandChannelManager = nil;
|
|
|
+
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{//非第一次
|
|
|
+ [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
@end
|