AlanQuatermain / aqtoolkit

A toolkit consisting of a bunch of generally useful routines and extensions I wrote when putting together other projects.
http://blog.alanquatermain.net/code
BSD 3-Clause "New" or "Revised" License
783 stars 148 forks source link

downloaderCompletedTask: never called if completed successfully (includes simple fix) #2

Open LouisStAmour opened 15 years ago

LouisStAmour commented 15 years ago

Just change the _markComplete method in AQLowMemoryDownloadHelper.m as follows:

- (void) _markComplete
{
    self.complete = YES;
    if (self.asyncDelegate != nil) {
        [self.asyncDelegate performSelector:@selector(downloaderCompletedTask:) withObject:self];
    }
}

And voila, it appears to work fine now. (I haven't tried testing multiple downloads at one time, etc., so you may need to experiment. In addition, it seems like downloaderCompletedTask is never called by the existing code, so I'll also want to add this line or another, to indicate failure. ymmv.)