URLSessionConfiguration httpMaximumConnectionsPerHost not working in iOS 10?

Setting this parameter does not affect the number of simultaneous connections to the host. I found the same issue on the apple developer forum . This looks like a bug in iOS 10, iOS 9 is working correctly.

let sessionConfiguration = URLSessionConfiguration.background(withIdentifier: <identifier>)
    sessionConfiguration.httpMaximumConnectionsPerHost = 4
    sessionConfiguration.allowsCellularAccess = AppDelegate.shared.userDefaults.allowsCellularAccess
    sessionConfiguration.timeoutIntervalForRequest = 7*60
    sessionConfiguration.timeoutIntervalForResource = 24*60*60
    let session = URLSession(configuration: sessionConfiguration, delegate:self, delegateQueue: operationQueue)

      

Does anyone have the same problem? If there is an alternative stable way of managing the queue of many uploads / downloads in the background?

+3


source to share





All Articles