Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-2680] corelibs-foundation URLRequest.timeoutInterval should override the URLSession.configuration value #4554

Closed
swift-ci opened this issue Sep 17, 2016 · 1 comment

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-2680
Radar None
Original Reporter klassobanieras (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

swift-3.0-GM-CANDIDATE
Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-34-generic x86_64)

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

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

@spevans
Copy link
Collaborator

spevans commented Mar 14, 2020

Ran the test listed above against the master branch and saw no issues with the timeouts.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 6, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants