Skip to content

Commit

Permalink
api_msg: Fixes for sock close from another thread
Browse files Browse the repository at this point in the history
Ref IDF-4794
  • Loading branch information
freakyxue authored and david-cermak committed Aug 16, 2022
1 parent 882716f commit 8cf7089
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/api_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,9 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err)
tcp_err(pcb, NULL);
/* remove reference from to the pcb from this netconn */
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. */
sys_mbox_free(&newconn->recvmbox);
sys_mbox_set_invalid(&newconn->recvmbox);
Expand Down

0 comments on commit 8cf7089

Please sign in to comment.