Skip to content

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