move to stock esp_http_server but keep it under control

- means 3 sockets are used (data + 2 for control)
- but LRU is activated (uses the 2 extra sockets to wake from select)
- backlog is just 1 (listen)
- only 3 sockets can be consumed before LRU activates
- for now, connections are kept-alive
This commit is contained in:
Philippe G
2021-12-14 11:52:51 -08:00
parent 412880d628
commit a266c07114
12 changed files with 117 additions and 460 deletions

View File

@@ -370,7 +370,7 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
// memory still used but at least task is not created
if (stats) {
// we allocate TCB but stack is staic to avoid SPIRAM fragmentation
// we allocate TCB but stack is static to avoid SPIRAM fragmentation
StaticTask_t* xTaskBuffer = (StaticTask_t*) heap_caps_malloc(sizeof(StaticTask_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
static EXT_RAM_ATTR StackType_t xStack[STAT_STACK_SIZE] __attribute__ ((aligned (4)));
stats_task = xTaskCreateStatic( (TaskFunction_t) output_thread_i2s_stats, "output_i2s_sts", STAT_STACK_SIZE,