Hi,
I use ASINetworkQueue to send two requests, which are in a queue. My problem is, that I'm not able to receive notifications when a request fails/is done.
Code:
[networkQueue cancelAllOperations];
[networkQueue setShowAccurateProgress:YES];
[networkQueue setUploadProgressDelegate:self.progressIndicator];
[networkQueue setDelegate:self];
[networkQueue setQueueDidFinishSelector:@selector(queueDidFinish)];
NSURL *urlAttachment = [NSURL URLWithString:@"http://localhost/test1.xml"]];
ASIFormDataRequest *requestFile = [[[ASIFormDataRequest alloc] initWithURL:urlAttachment] autorelease];
[requestFile setFile:filePath forKey:@"attachment[test]"];
[requestFile setDidFailSelector:@selector(test1WentWrong)];
[requestFile setDidFinishSelector:@selector(test1Done)];
[networkQueue addOperation:requestFile]; //queue is an NSOperationQueue
NSURL *url = [NSURL URLWithString:@"http://localhost/test2.xml"]];
ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
[request setPostValue:test.filename forKey:@"filename[test]" ];
[request setDidFailSelector:@selector(test2WentWrong)];
[request setDidFinishSelector:@selector(test2Done)];
[networkQueue addOperation:request]; //queue is an NSOperationQueue
[networkQueue go];
test1WentWrong, test1Done, test2WentWrong, test2Done aren't called. Although the request runs fine and queueDidFinish gets called.