MugunthKumar/MKNetworkKit

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

frranck opened this issue · 0 comments

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 ?