Last active
April 22, 2016 08:25
-
-
Save kean/23b1a0303affbb4f245d5fd06cc0ceca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)_fetchSomethingOrDieWithCompletion:(void (^)(id something))completion { | |
_autoRetryController = [[[GMURLAutoRetryController alloc] initWithBlock:^(GMAutoRetryController * _Nonnull controller) { | |
[/* start request with */ completion:^(id __nullable something, NSError * __nullable error) { | |
if (error) { | |
[controller scheduleAutoRetryWithError:error]; | |
} else { | |
completion(something); | |
} | |
}]; | |
}] resume]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment