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
When URLSession's dataTask(with: URLRequest) is used to fetch data, the request's timeoutInterval does not currently override the URLSession.configuration timeout value.
The correct (or at least oldskool Foundation) behaviour is that URLRequest.timeoutInterval takes precedence over the session configuration, if it has been set at least once.
NB: There is some magic involved here, in that URLRequest.timeoutInterval has a default value of 60, but this does not appear to have any actual effect, unless you invoke ''request.timeoutInterval = request.timeoutInterval".
Environment
swift-3.0-GM-CANDIDATE
Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-34-generic x86_64)
Additional Detail from JIRA
md5: ae5c89d6edcac199f21ab47239e6a40d
Issue Description:
When URLSession's dataTask(with: URLRequest) is used to fetch data, the request's timeoutInterval does not currently override the URLSession.configuration timeout value.
The correct (or at least oldskool Foundation) behaviour is that URLRequest.timeoutInterval takes precedence over the session configuration, if it has been set at least once.
NB: There is some magic involved here, in that URLRequest.timeoutInterval has a default value of 60, but this does not appear to have any actual effect, unless you invoke ''request.timeoutInterval = request.timeoutInterval".
https://github.com/mike-ferenduros/swift-corelibs-foundation/blob/more-urlsession-tests/TestFoundation/TestNSURLSession.swift#L188
The text was updated successfully, but these errors were encountered: