File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -260,9 +260,9 @@ open class URLSessionTask : NSObject, NSCopying {
260
260
userInfo [ NSURLErrorFailingURLStringErrorKey] = url. absoluteString
261
261
}
262
262
let error = NSError ( domain: NSURLErrorDomain,
263
- code: URLError . unsupportedURL . rawValue ,
263
+ code: NSURLErrorUnsupportedURL ,
264
264
userInfo: userInfo)
265
- _ProtocolClient ( ) . urlProtocol ( task : self , didFailWithError: error)
265
+ _ProtocolClient ( ) . urlSessionTask ( self , didFailWithError: URLError ( _nsError : error) )
266
266
}
267
267
}
268
268
}
@@ -588,10 +588,10 @@ extension _ProtocolClient : URLProtocolClient {
588
588
589
589
func urlProtocol( _ protocol: URLProtocol , didFailWithError error: Error ) {
590
590
guard let task = `protocol`. task else { fatalError ( ) }
591
- urlProtocol ( task : task, didFailWithError: error)
591
+ urlSessionTask ( task, didFailWithError: error)
592
592
}
593
593
594
- func urlProtocol ( task: URLSessionTask , didFailWithError error: Error ) {
594
+ func urlSessionTask ( _ task: URLSessionTask , didFailWithError error: Error ) {
595
595
guard let session = task. session as? URLSession else { fatalError ( ) }
596
596
switch session. behaviour ( for: task) {
597
597
case . taskDelegate( let delegate) :
You can’t perform that action at this time.
0 commit comments