Improve description messages of error message dialogs

This commit is contained in:
Cameron Gutman
2019-10-12 16:41:32 -07:00
parent 565a8e56e6
commit 1121a918d1
4 changed files with 49 additions and 53 deletions

View File

@@ -18,11 +18,11 @@
HttpManager* hMan = [[HttpManager alloc] initWithHost:hostIP uniqueId:uniqueId serverCert:cert];
// Try up to 5 times to get the app list
AppListResponse* appListResp;
AppListResponse* appListResp = nil;
for (int i = 0; i < 5; i++) {
appListResp = [[AppListResponse alloc] init];
[hMan executeRequestSynchronously:[HttpRequest requestForResponse:appListResp withUrlRequest:[hMan newAppListRequest]]];
if (appListResp == nil || ![appListResp isStatusOk] || [appListResp getAppList] == nil) {
if (![appListResp isStatusOk] || [appListResp getAppList] == nil) {
Log(LOG_W, @"Failed to get applist on try %d: %@", i, appListResp.statusMessage);
// Wait for one second then retry
@@ -30,10 +30,11 @@
}
else {
Log(LOG_I, @"App list successfully retreived - took %d tries", i);
return appListResp;
break;
}
}
return nil;
return appListResp;
}
@end