|
|
@@ -997,12 +997,19 @@ int esp_http_client_read(esp_http_client_handle_t client, char *buffer, int len)
|
|
|
}
|
|
|
ESP_LOG_LEVEL(sev, TAG, "esp_transport_read returned:%d and errno:%d ", rlen, errno);
|
|
|
}
|
|
|
+#ifdef CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS
|
|
|
+ if (rlen == ESP_TLS_ERR_SSL_WANT_READ || errno == EAGAIN) {
|
|
|
+#else
|
|
|
+ if (errno == EAGAIN) {
|
|
|
+#endif
|
|
|
+ ESP_LOGD(TAG, "Received EAGAIN! rlen = %d, errno %d", rlen, errno);
|
|
|
+ return ridx;
|
|
|
+ }
|
|
|
if (rlen < 0 && ridx == 0 && !esp_http_client_is_complete_data_received(client)) {
|
|
|
http_dispatch_event(client, HTTP_EVENT_ERROR, esp_transport_get_error_handle(client->transport), 0);
|
|
|
return ESP_FAIL;
|
|
|
- } else {
|
|
|
- return ridx;
|
|
|
}
|
|
|
+ return ridx;
|
|
|
}
|
|
|
res_buffer->output_ptr = buffer + ridx;
|
|
|
http_parser_execute(client->parser, client->parser_settings, res_buffer->data, rlen);
|