MKSG-MugunthKumar / MKNetworkKit

Modern NSURLSession based Networking Framework with built in authentication and HTTP 1.1 caching standards support for iOS 8+ devices
http://mk.sg/8w
3.06k stars 755 forks source link

onCompletion block is executing X times (more than twice!) #447

Open frranck opened 9 years ago

frranck commented 9 years ago

If i do the same GET (same url) in // 5 times. (with the caching off.) each different completion function will be called multiple times (more than 2, sometime up to 4 times)

It can be patched by changing the uniqueIdentifier function in MKNetworkOperation.m

-(NSString *) uniqueIdentifier {  
  //NSMutableString *str = [NSMutableString stringWithFormat:@"%@ %@ %@", self.request.HTTPMethod, self.url, self.responseBlocks];
    NSMutableString *str = [NSMutableString stringWithFormat:@"%@ %@", self.request.HTTPMethod, self.url];

But it seems like a meant behaviour, could i get a feedback on it ?