Skip to content

Commit 96fd921

Browse files
committed
pass nil for completionHandler in cancel
1 parent 3297630 commit 96fd921

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Foundation/URLSession/URLSessionTask.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,8 @@ open class URLSessionDownloadTask : URLSessionTask {
437437
* original behavior cannot be directly ported, here.
438438
*
439439
* Instead, we just call the completionHandler directly.
440-
*
441-
* A token Data value is passed to the client to prevent unexpected failures
442-
* that may be caused from passing nil instead.
443440
*/
444-
completionHandler(Data())
441+
completionHandler(nil)
445442
}
446443
}
447444

0 commit comments

Comments
 (0)