Skip to content

Commit 5c3050e

Browse files
author
Pushkar Kulkarni
committed
[URLSession]Fix a crash in _HTTPBodyDataSource.getNextChunk()
1 parent 8423946 commit 5c3050e

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)