Parcourir la 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 il y a 9 ans
Parent
commit
cfed41d1cf
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  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];
                            });
                        }];