Browse Source

Fix AFImageDownloader stalling after number of failures reaches maximumActiveDownloads.

The active task count was only being decremented after success. Once
the number of failures reaches the maximumActiveDownloads, no more
tasks were being started.
Rick Silva 9 years ago
parent
commit
cfed41d1cf
1 changed files with 3 additions and 2 deletions
  1. 3 2
      UIKit+AFNetworking/AFImageDownloader.m

+ 3 - 2
UIKit+AFNetworking/AFImageDownloader.m

@@ -244,9 +244,10 @@
                                            });
                                        }
                                    }
-                                   [strongSelf safelyDecrementActiveTaskCount];
-                                   [strongSelf safelyStartNextTaskIfNecessary];
+
                                }
+                               [strongSelf safelyDecrementActiveTaskCount];
+                               [strongSelf safelyStartNextTaskIfNecessary];
                            });
                        }];