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

response blocks not initialised in initWithCoder #408

Open JanC opened 10 years ago

JanC commented 10 years ago

Hi, when I restore a MKNetworkOperation from a persisted state, the internal array errorBlocks, errorBlocksType2, responseBlocks are not reinitialised and they are nil. So no more callback can be added to this operations

I think they should be alloced again in the initWithCoder

- (id)initWithCoder:(NSCoder *)decoder
{
...
   /// this is missing ?
    self.errorBlocks = [NSMutableArray array];
    self.errorBlocksType2 = [NSMutableArray array];
    self.responseBlocks = [NSMutableArray array];
}