Skip to content

audio: rework HTTP timeout behaviour#450

Merged
stintel merged 2 commits intomainfrom
http_connect_timeout
Feb 12, 2026
Merged

audio: rework HTTP timeout behaviour#450
stintel merged 2 commits intomainfrom
http_connect_timeout

Conversation

@stintel
Copy link
Copy Markdown
Collaborator

@stintel stintel commented Feb 12, 2026

Something between ESP-IDF v5.1.1 and 5.3.3 changed that causes the 10s timeout we set in the HTTP_STREAM_POST_REQUEST callback to be ignored when using HTTPS. Due to this, people with slower WIS cannot use Willow 0.4 anymore. Set the timeout to 10s in HTTP_STREAM_PRE_REQUEST to not use the ESP-ADF http_stream hardcoded default of 30s.

If WIS is not running, or the user configured a wrong IP or port, the transport layer detects the problem early anyway.

This reverts commit 37192642e58e9f8dc90a3babae96a8889066d788.

The change was an attempt to fix the following issue reported by a user:

I (10:37:32.526) WILLOW/AUDIO: AUDIO_REC_WAKEUP_END
I (10:37:32.542) WILLOW/AUDIO: WIS HTTP client HTTP_STREAM_POST_REQUEST, write end chunked marker
E (10:37:34.547) transport_base: esp_tls_conn_read error, errno=No more processes
I (10:37:34.548) WILLOW/AUDIO: WIS HTTP client HTTP_STREAM_FINISH_REQUEST
E (10:37:34.562) WILLOW/AUDIO: WIS response took longer than 2000ms, connection aborted

Unfortunately this change didn't fix the bug.

The problem is that something changed between the ESP components in
0.3.* and 0.4.*, and this particular problem happens only when using WIS
over TLS. As the change doesn't fix anything, revert it.
Something between ESP-IDF v5.1.1 and 5.3.3 changed that causes the 10s
timeout we set in the HTTP_STREAM_POST_REQUEST callback to be ignored
when using HTTPS. Due to this, people with slower WIS cannot use Willow
0.4 anymore. Set the timeout to 10s in HTTP_STREAM_PRE_REQUEST to not
use the ESP-ADF http_stream hardcoded default of 30s.

If WIS is not running, or the user configured a wrong IP or port, the
transport layer detects the problem early anyway.
@stintel stintel force-pushed the http_connect_timeout branch from 6765fb9 to 9694d78 Compare February 12, 2026 15:38
@stintel stintel merged commit 9b0bbf3 into main Feb 12, 2026
9 checks passed
@stintel stintel deleted the http_connect_timeout branch February 12, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant