我用esp8266作为client向http server发送post请求,发送10几分钟之后,espconn_send就会返回ESPCONN_MEM错误,上一包数据发送完成,进入sent callback之后我再发下一条post请求.我怀疑是连接的tcp_pcb没有释放掉,可是我不知道该如何释放,我在disconnect callback中espconn_delete或espconn_disconnect都不行,请问有没有好的解决办法
void ICACHE_FLASH_ATTR disconnect_callback(void *arg)
{
struct espconn *conn = (struct espconn *)arg;
sint8 error = espconn_delete(conn);
//sint8 error = espconn_disconnect(conn);
if(conn->proto.tcp != NULL) {
os_free(conn->proto.tcp);
conn->proto.tcp = NULL;
}
os_free(conn);
user_conn = NULL;
if(error != 0){
char str[30];
os_sprintf(str, " delete err: %d", error);
uart0_sendStr(str);
}
}
esp8266作为client向http server发送post请求,发送一段时间就会ESPCONN_MEM
Who is online
Users browsing this forum: No registered users and 150 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.