Parcourir la source

[Issue #622] Fixed issue where task was not being released by SessionDelegate.

Christian Noon il y a 10 ans
Parent
commit
cbd7870367
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      Source/Manager.swift

+ 2 - 1
Source/Manager.swift

@@ -314,8 +314,9 @@ public class Manager {
                 taskDidComplete(session, task, error)
             } else if let delegate = self[task] {
                 delegate.URLSession(session, task: task, didCompleteWithError: error)
-                self[task] = nil
             }
+
+            self[task] = nil
         }
 
         // MARK: - NSURLSessionDataDelegate