ESP_ERR_HTTP_EAGAIN in http calls

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

ESP_ERR_HTTP_EAGAIN in http calls

Postby Ritu21 » Wed Apr 03, 2019 1:53 pm

Hi,

I made http calls non blocking by keeping is_async = true in esp_http_client_config_t. To avoid ESP_ERR_HTTP_EAGAIN
error (which we get mostly in making non-blocking calls), I implemented below code in my http call:

while(1){
err = esp_http_client_perform(client);
if(err != ESP_ERR_HTTP_EAGAIN)
break;
}

What is best way to exit from this infinite loop, as when internet is off, it gets struck infinitely in this loop by throwing ESP_ERR_HTTP_EAGAIN even after switching on the internet.


Thanks
Ritu.

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

Re: ESP_ERR_HTTP_EAGAIN in http calls

Postby Ritu21 » Thu Apr 04, 2019 4:35 am

Hi,

Waiting for your response.

Thanks
Ritu

Who is online

Users browsing this forum: No registered users and 115 guests