Skip to content

Commit e9855af

Browse files
committed
Fixing race condition in UIImageView category with cached images. Thanks @iwat (Chaiwat S.)
1 parent e7f7994 commit e9855af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

AFNetworking/UIImageView+AFNetworking.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ - (void)setImageWithURLRequest:(NSURLRequest *)urlRequest
9292
UIImage *cachedImage = [[AFImageCache sharedImageCache] cachedImageForURL:[urlRequest URL] cacheName:nil];
9393
if (cachedImage) {
9494
self.image = cachedImage;
95+
self.af_imageRequestOperation = nil;
9596

9697
if (success) {
9798
success(nil, nil, cachedImage);

0 commit comments

Comments
 (0)