久芯网

lwip 出现错误: recvmbox must be deallocated before calling this function ?

avatar hpdell 提问时间: 2023-10-03 19:37:31 / 未解决
lwip 出现错误: recvmbox must be deallocated before calling this function ? [相关图片]

现象说明:

在 服务器端 与 开发板之间连接成功后, 就不会出现 任何错误,工作也都正常
    当 服务器端断开连接后,大概 5-10s 左右就会出现  错误, 另外还会提示
Assertion "recvmbox must be deallocated before calling this function" failed at line 803 in ..\Middlewares\Third_Party\LwIP\src\api\api_msg.c
Assertion "acceptmbox must be deallocated before calling this function" failed at line 806 in ..\Middlewares\Third_Party\LwIP\src\api\api_msg.c


请问 上面的 问题该如何解决啊 ??

使用的是 embOS + Lwip 组合
1个回答
  • avatar butterflyspring
    回答时间: 2023-10-03 20:05:21

    根据协议栈的函数,调试一下,看看有没有free mbox void netconn_free(struct netconn *conn) { LWIP_ASSERT("CB must be deallocated outside this function", conn->pcb.tcp == NULL); #if LWIP_NETCONN_FULLDUPLEX /* in fullduplex, netconn is drained here */ netconn_drain(conn); #endif /* LWIP_NETCONN_FULLDUPLEX */ LWIP_ASSERT("recvmbox must be deallocated before calling this function", !sys_mbox_valid(&conn->recvmbox)); #if LWIP_TCP LWIP_ASSERT("acceptmbox must be deallocated before calling this function", !sys_mbox_valid(&conn->acceptmbox));

会员中心 微信客服
客服
回到顶部