From 7d9c93fb515b4ac9b52240c2de10b14ed8cf3fdd Mon Sep 17 00:00:00 2001 From: Dale Buckley Date: Tue, 4 Jun 2013 12:04:36 +0100 Subject: [PATCH] #406 - Fixed a problem where hitting a failed URL more than once wouldn't call the completion block --- SDWebImage/SDWebImageManager.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 93690a00..068fa61e 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -91,7 +91,11 @@ if (!url || !completedBlock || (!(options & SDWebImageRetryFailed) && isFailedUrl)) { - if (completedBlock) completedBlock(nil, nil, SDImageCacheTypeNone, NO); + if (completedBlock) + { + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist userInfo:nil]; + completedBlock(nil, error, SDImageCacheTypeNone, YES); + } return operation; }