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

added timeout property and implemented the property in both OkHttpNetworkHandler and NSUrlSessionHandler #201

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mikhailswift
Copy link

Ran into issues with our implementation of ModernHttpClient not properly obeying our set timeout interval in iOS. Since we don't have access to the client directly here the best option seemed to be to add a new property and passing that down into the respective request handlers for each platform.

@alexrainman
Copy link

Maybe this can solve the issue i have where timeout is not respected in Android.

@mikhailswift
Copy link
Author

@alexrainman It's been a while, but I'm curious, did this solve your timeout issues with Android?

@digital-synapse
Copy link

This dosen't seem to work for me on android. Timeout is alwaysl null inside of SendAsync causing it to be ignored.

@alexrainman
Copy link

Yes, it is solved and included in my branch modernhttpclient-updated

xk0gap and others added 4 commits March 1, 2018 19:57
The setting of:

rq.TimeoutInterval = Timeout.Value.Seconds;

Should be:

rq.TimeoutInterval = Timeout.Value.TotalSeconds;

so that the TimeoutInterval is set to the TimeSpan in seconds rather than the seconds part of the Timespan which would be zero for any whole minute.
NSUrlSessionHandler: TimeoutInterval to TotalSeconds rather than Seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants