Browse Source

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

Christian Noon 10 years ago
parent
commit
cbd7870367
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/Manager.swift

+ 2 - 1
Source/Manager.swift

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