I want to cancel all requests. Here is how I'm creating asynchronous connection:
[NSURLConnection sendAsynchronousRequest:echo queue:self.queue completionHandler:^(NSURLResponse *respone, NSData *data, NSError *error){
I then use this method:
-(void)cancelAllRequests
{
NSLog(@"%@",self.queue.operations);
[self.queue cancelAllOperations];
[self.queue waitUntilAllOperationsAreFinished];
}
to cancel all requests.
Which actually doesn't do anything except changing a BOOL to YES.
So how I'm supposed to cancel an asynchronous connection?