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

iOS HttpRequest runs until timeout #232

Open
vovinh opened this issue Oct 6, 2016 · 4 comments
Open

iOS HttpRequest runs until timeout #232

vovinh opened this issue Oct 6, 2016 · 4 comments

Comments

@vovinh
Copy link

vovinh commented Oct 6, 2016

_client.Timeout = TimeSpan.FromSeconds(160);
  var request = new HttpRequestMessage()
            {
                RequestUri = requestUri,
                Method = HttpMethod.Get,
            };

  var response = await _client.SendAsync(request, ct).ConfigureAwait(false);
  response.EnsureSuccessStatusCode(); var rawdata = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

During the request, I disconnect Wifi connection. In Android, an exception is thrown and I don't have to wait for the timeout to expire. However, in iOS, the connection keeps going on until timeout expires which is incorrect behavior.

@RudolfVonKrugstein
Copy link

+1 Same problem here

@Cheesebaron
Copy link
Contributor

Why is it you can't use Xamarin's Android handler?

@jonathanantoine
Copy link

Any update here ?

@Cheesebaron : you can't use the Android Handler on iOS :)

@Cheesebaron
Copy link
Contributor

@jonathanantoine then use the NSUrl one Xamarin provides?

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

No branches or pull requests

4 participants