esp_http_client stream loosing connection after some time
Posted: Mon Feb 13, 2023 4:09 pm
Hi guys,
I am consuming a https stream (text/event-stream) with esp_http_client_perform(). It works fine if there is a constant stream of data (I am processing the data in an event handler). But if there is no message for around 20 minutes, data will not be processed further and the connection seems to have died.
This is my configuration:
I have tried to find an error message by activating the mbedtls and lwip ip logs, but they seem not to notice the connection drop.
The last message from lwip states that it is using lwip_select() am I missing a timeout or something related?
Can someone give me hints on how to solve this or further debugging steps?
I appreciate your help and greetings.
Schieberegister.
I am consuming a https stream (text/event-stream) with esp_http_client_perform(). It works fine if there is a constant stream of data (I am processing the data in an event handler). But if there is no message for around 20 minutes, data will not be processed further and the connection seems to have died.
This is my configuration:
Code: Select all
esp_http_client_config_t http_config = {
.timeout_ms = -1, // seems to disable the tcp timeout
.keep_alive_enable = true,
.keep_alive_idle = 10,
.keep_alive_interval = 10,
.keep_alive_count = 2,
.transport_type = HTTP_TRANSPORT_OVER_SSL,
.method = HTTP_METHOD_GET,
};
The last message from lwip states that it is using lwip_select() am I missing a timeout or something related?
Can someone give me hints on how to solve this or further debugging steps?
I appreciate your help and greetings.
Schieberegister.