You get the request by calling [self request] . If request is atomic @property or otherwise thread safe, I can't think of any reason why you could not try again from a non-main thread.
Alternatively, you can put a copy of the request in a local variable before your call +sendAsynchronousRequest:queue: If you do this, then call it in the completion handler, it will be saved implicitly and [self request] will be called only once.
Generally speaking, this is probably not a very good model. If the service is disabled, there are no other checks, it will just try forever. You can try something like this:
NSURLRequest* req = [self request]; NSOperationQueue* queue = [[NSOperationQueue alloc] init]; __block NSUInteger tries = 0; typedef void (^CompletionBlock)(NSURLResponse *, NSData *, NSError *); __block CompletionBlock completionHandler = nil;
ipmcc source share