You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We're not going to heed this one. If someone is setting it in Linux code, they may be relying on behavior that isn't there; warn.
38
-
@available(*, deprecated, message:"swift-corelibs-foundation does not support URLSession instances, and this property is documented to have no effect when set on tasks created from non-background URLSession instances. Modifying this property has no effect in swift-corelibs-foundation and shouldn't be relied upon; resume tasks at the appropriate time instead.")
93
+
@available(*, deprecated, message:"swift-corelibs-foundation does not support background URLSession instances, and this property is documented to have no effect when set on tasks created from non-background URLSession instances. Modifying this property has no effect in swift-corelibs-foundation and shouldn't be relied upon; resume tasks at the appropriate time instead.")
39
94
openvarearliestBeginDate:Date?=nil
40
95
41
96
/// How many times the task has been suspended, 0 indicating a running task.
@@ -179,6 +234,9 @@ open class URLSessionTask : NSObject, NSCopying {
179
234
self.body = body
180
235
super.init()
181
236
self.currentRequest = request
237
+
self.progress.cancellationHandler ={[weak self]in
238
+
self?.cancel()
239
+
}
182
240
}
183
241
deinit{
184
242
//TODO: Do we remove the EasyHandle from the session here? This might run on the wrong thread / queue.
@@ -237,6 +295,7 @@ open class URLSessionTask : NSObject, NSCopying {
0 commit comments