Hi Kenny:
I think this issue is resulted from memory. main_task allocated some memory with _mem_alloc_zero, when the task is terminated, MQX RTOS returns the task's private memory blocks to memory. You can change the _mem_alloc_zero to _mem_alloc_system_zero, then the main task can be expired.
Please check the following line.
In main_task,
| | indexes[i] = (char*) _mem_alloc_zero(sizeof("\\index_x.html")); |
In HTTPSRV_init, there are also 3 lines need to be changed
Have a great day,
Daniel