File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,7 @@ open class URLSession : NSObject {
211
211
self . workQueue = DispatchQueue ( label: " URLSession< \( identifier) > " )
212
212
self . taskAttributesIsolation = DispatchQueue ( label: " URLSession< \( identifier) >.taskAttributes " , attributes: DispatchQueue . Attributes. concurrent)
213
213
self . delegateQueue = OperationQueue ( )
214
+ self . delegateQueue. maxConcurrentOperationCount = 1
214
215
self . delegate = nil
215
216
//TODO: Make sure this one can't be written to?
216
217
// Could create a subclass of URLSessionConfiguration that wraps the
@@ -225,7 +226,9 @@ open class URLSession : NSObject {
225
226
identifier = nextSessionIdentifier ( )
226
227
self . workQueue = DispatchQueue ( label: " URLSession< \( identifier) > " )
227
228
self . taskAttributesIsolation = DispatchQueue ( label: " URLSession< \( identifier) >.taskAttributes " , attributes: DispatchQueue . Attributes. concurrent)
228
- self . delegateQueue = queue ?? OperationQueue ( )
229
+ let operationQueue = OperationQueue ( )
230
+ operationQueue. maxConcurrentOperationCount = 1
231
+ self . delegateQueue = queue ?? operationQueue
229
232
self . delegate = delegate
230
233
//TODO: Make sure this one can't be written to?
231
234
// Could create a subclass of URLSessionConfiguration that wraps the
You can’t perform that action at this time.
0 commit comments