diff --git a/src/api/api_msg.c b/src/api/api_msg.c index 6037ac992..b8464e29c 100644 --- a/src/api/api_msg.c +++ b/src/api/api_msg.c @@ -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);