HttpClient hangs on first/second request always

When i use the HttpClient, i experiment a 10 second delay on any request, the first time/second time.
After this, everything is working well. No more delays on any request. It only hangs when im using wifi. Using 3g/4g the delay seems to be shorter 1s or 2s.
I use a 2 different devices to debug the code, Samsung note 5 and a Micromax(32 bit) with android 6.0.1 in both devices.

I did not find any warnings. Just this "Xamarin.Android returned no custom HttpClientHandler. Defaulting to System.Net.Http.HttpClientHandler" when create the HttpClient.

I'm using Xamarin.android 6.1.2-21
System.Net.Http v 4.3.1

using (var httpClient = createClient())
{
string url = "rc1-2.php";
var response = await httpClient.GetAsync(url);
var content = await response.Content.ReadAsStringAsync();
Debug.WriteLine("Response: " + content);
}

Sign In or Register to comment.