Page 1 of 1

ESP_ERR_HTTP_EAGAIN in http calls

Posted: Wed Apr 03, 2019 1:53 pm
by Ritu21
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.

Re: ESP_ERR_HTTP_EAGAIN in http calls

Posted: Thu Apr 04, 2019 4:35 am
by Ritu21
Hi,

Waiting for your response.

Thanks
Ritu