mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-10-16 20:57:39 +00:00
api_msg: Fixes for sock close from another thread
Ref IDF-4794
This commit is contained in:
@@ -595,6 +595,9 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err)
|
|||||||
tcp_err(pcb, NULL);
|
tcp_err(pcb, NULL);
|
||||||
/* remove reference from to the pcb from this netconn */
|
/* remove reference from to the pcb from this netconn */
|
||||||
newconn->pcb.tcp = NULL;
|
newconn->pcb.tcp = NULL;
|
||||||
|
#if ESP_LWIP && LWIP_NETCONN_FULLDUPLEX
|
||||||
|
newconn->flags |= NETCONN_FLAG_MBOXINVALID;
|
||||||
|
#endif /* ESP_LWIP && LWIP_NETCONN_FULLDUPLEX */
|
||||||
/* no need to drain since we know the recvmbox is empty. */
|
/* no need to drain since we know the recvmbox is empty. */
|
||||||
sys_mbox_free(&newconn->recvmbox);
|
sys_mbox_free(&newconn->recvmbox);
|
||||||
sys_mbox_set_invalid(&newconn->recvmbox);
|
sys_mbox_set_invalid(&newconn->recvmbox);
|
||||||
|
|||||||
Reference in New Issue
Block a user