From cded20c736de2fcb7c801bdcb3c2626cb98772d3 Mon Sep 17 00:00:00 2001 From: Dick Date: Mon, 22 Dec 2014 16:58:16 +0800 Subject: [PATCH] duplicate failed urls are added into failedURLs fix bug when download image with option SDWebImageRetryFailed --- SDWebImage/SDWebImageManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 38f75f0c..0d2f31be 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -194,7 +194,9 @@ if (error.code != NSURLErrorNotConnectedToInternet && error.code != NSURLErrorCancelled && error.code != NSURLErrorTimedOut) { @synchronized (self.failedURLs) { - [self.failedURLs addObject:url]; + if (![self.failedURLs containsObject:url]) { + [self.failedURLs addObject:url]; + } } } }