Skip to content

Commit 0fd21a9

Browse files
authored
Merge pull request #907 from pushkarnk/urlsession-crash
2 parents 8423946 + 5c3050e commit 0fd21a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSURLSession/HTTPBodySource.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension _HTTPBodyDataSource : _HTTPBodySource {
8181
return .done
8282
} else if remaining <= length {
8383
let r: DispatchData! = data
84-
data = nil
84+
data = DispatchData.empty
8585
return .data(r)
8686
} else {
8787
let (chunk, remainder) = splitData(dispatchData: data, atPosition: length)

0 commit comments

Comments
 (0)