HTTP client fail in async mode

jakobj
Posts: 8
Joined: Fri Jul 15, 2022 4:57 am

HTTP client fail in async mode

Postby jakobj » Sat Feb 25, 2023 7:21 am

I'm trying run the http client in async mode.
I works fine running in blocking mode, but when I change to async mode it fails, with the failure below.

The only thing I changed in my code was:

esp_http_client_config_t config = {
.method = method,
.url = url,
.event_handler = _http_event_handler,
.crt_bundle_attach = esp_crt_bundle_attach,
.user_data = buffer, // Pass address of local buffer to get response
.buffer_size = MAX_HTTP_OUTPUT_BUFFER,
.timeout_ms = 20000,
.is_async = true,
};
s_client = esp_http_client_init(&config);
...
...
do {
err = esp_http_client_perform(s_client);
} while (ESP_ERR_HTTP_EAGAIN == err);


I (108762) GATTS_SPP_TUK: EVT 15, gatts if 3
I (108765) GATTS_SPP_TUK: event = f
E (108776) GATTS_SPP_TUK: GAP_EVT, event 6
W (108844) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16
I (110091) esp-x509-crt-bundle: Certificate validated
E (129593) transport_base: esp_tls_conn_read error, errno=No more processes2

Who is online

Users browsing this forum: No registered users and 65 guests