Browse Source

[PR #2056] Removed redundant optional unwrap in SessionDelegate.

Boris Dušek 8 years ago
parent
commit
c1620fc7f2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/SessionDelegate.swift

+ 2 - 2
Source/SessionDelegate.swift

@@ -462,8 +462,8 @@ extension SessionDelegate: URLSessionTaskDelegate {
         // Determine whether an error has occurred
         // Determine whether an error has occurred
         var error: Error? = error
         var error: Error? = error
 
 
-        if let taskDelegate = self[task]?.delegate, taskDelegate.error != nil {
-            error = taskDelegate.error
+        if request.delegate.error != nil {
+            error = request.delegate.error
         }
         }
 
 
         /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request
         /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request