Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when connection was lost #5

Open
Allui opened this issue Feb 15, 2019 · 0 comments
Open

Crash when connection was lost #5

Allui opened this issue Feb 15, 2019 · 0 comments

Comments

@Allui
Copy link

Allui commented Feb 15, 2019

#pragma mark - Downloading the APPINFO JSON FILE
-(void)downloadAppInfoFile{
    NSError *error;
    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:stringDBAppInfoURL] options:NSDataReadingUncached error:&error];
    if(error)
    {
        NSLog(@"AppUpadterNotifier - Error while downloading the app info -----%@",error);
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [self downloadAppInfoFile];
        });
    }
    [self parseJSONDataIntoDictinory:data];
}

The method [self parseJSONDataIntoDictinory:data]; invokes crash because data is nil when connections is lost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant