-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix for URLSession redirect does not inherit request timeout value[SR… #1063
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
Conversation
@saiHemak does this maybe fix problems with |
} | ||
} | ||
|
||
func getTimetaken() -> Double { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: should be getTimeTaken()
.
} | ||
|
||
func getTimetaken() -> Double { | ||
let timeTaken = UnsafeMutablePointer<Double>.allocate(capacity: 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct. You are allocating 8 instances of type Double
. The body of this function should be:
var timeSpent = Double()
CFURLSession_easy_getinfo_double(rawHandle, CFURLSessionInfoTOTAL_TIME, &timeSpent)
return timeSpent
Since this is used only for subtracting from the timeout interval, it might be worthwhile to return timeSpent / 1000
and to rename this function getTimeoutIntervalSpent()
.
3a7cb8f
to
731498c
Compare
@swift-ci please test |
1 similar comment
@swift-ci please test |
@bubski I could see the test case |
@saiHemak I pulled newest changes and the problem went away. |
@swift-ci test and merge |
…-2682]