I have been working with the esp32, trying to get my httpserver from esp8266.
I migrated the code to the new architecture and it seems to receive just fine data, but when i try to netconn_write i get a stackoverflow detection.
This is a snippet of the code i'm using:
Code: Select all
xSemaphoreTake(write_socket_lock, portMAX_DELAY);
_httpserver_response_header(buffer, response);
if (strlen(buffer) > 0) {
ets_printf("\n\n\n\nbefore crash\n");
netconn_write(request->conn, buffer, strlen(buffer), NETCONN_COPY);
ets_printf("after write 1\n");
netconn_write(request->conn, response->body, response->body_len, NETCONN_COPY);
ets_printf("after crash 2\n");
}
xSemaphoreGive(write_socket_lock);
ets_printf("after semaphore\n");
Code: Select all
before crash
***ERROR*** A stack overflow in task server80.start has been detected.
Thanks.
DM