mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-26 22:24:40 +00:00
Only retry 5 times to fetch box art
This commit is contained in:
parent
bed8c729f9
commit
d4b5ec5764
@ -13,12 +13,14 @@
|
||||
#import "HttpRequest.h"
|
||||
|
||||
@implementation AppAssetRetriever
|
||||
static const double RETRY_DELAY = 1; // seconds
|
||||
static const double RETRY_DELAY = 2; // seconds
|
||||
static const int MAX_ATTEMPTS = 5;
|
||||
|
||||
|
||||
- (void) main {
|
||||
UIImage* appImage = nil;
|
||||
while (![self isCancelled] && appImage == nil) {
|
||||
int attempts = 0;
|
||||
while (![self isCancelled] && appImage == nil && attempts++ < MAX_ATTEMPTS) {
|
||||
if (self.useCache) {
|
||||
@synchronized(self.cache) {
|
||||
UIImage* cachedImage = [self.cache objectForKey:self.app.appId];
|
||||
|
Loading…
x
Reference in New Issue
Block a user