socket未连接优化
This commit is contained in:
@@ -321,14 +321,28 @@ Copy NSString *deviceId;
|
||||
{
|
||||
return;
|
||||
}
|
||||
[MBProgressHUD hideHUDForView:self.view animated:YES];
|
||||
self.HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
|
||||
self.HUD.mode = MBProgressHUDModeIndeterminate;
|
||||
self.HUD.labelText = msg;
|
||||
if ([msg containsString:@"Socket连接失败"])
|
||||
{
|
||||
[self.HUD hide:YES afterDelay:5];
|
||||
[self.HUD hide:YES afterDelay:3];
|
||||
[self endProgress];
|
||||
[self.progressView endProgressWithString:@"连接失败"];
|
||||
if (self.retryTimes<10)
|
||||
{
|
||||
self.retryTimes++;
|
||||
[self.progressView endProgressWithString:@"自动重试..."];
|
||||
WEAK_SELF;
|
||||
[[IFishHotpotUDPHelper sharedInstance] closeComplete:^{
|
||||
[weakSelf sendToDeviceWithSSIDName:weakSelf.wifiName andSSIDPWD:weakSelf.wifiPassword];
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.progressView endProgressWithString:@"连接结束"];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
-(void)endProgress{
|
||||
|
||||
Reference in New Issue
Block a user