the following code crashes:
Code: Select all
static struct espconn conn;
conn.type = ESPCONN_TCP;
conn.state = ESPCONN_NONE;
conn.proto.tcp = (esp_tcp *)zalloc(sizeof(esp_tcp));
conn.proto.tcp->local_port = port;
espconn_regist_connectcb(&conn, onNewClient);
espconn_accept(&conn);
espconn_tcp_set_max_con_allow(&conn, 2);
espconn_regist_time(&conn, CLIENT_TIMEOUT_S, 0);
If I remove the "espconn_tcp_set_max_con_allow" it does not.
I'm using RTOS SDK v1.4.0.