Skip to content

Commit 855c80c

Browse files
committed
fix(lwip): Fix lwip TCP server "accept" sync error
1 parent 95d9153 commit 855c80c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/lwip/lwip/src/api/api_msg.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,12 +799,18 @@ netconn_drain(struct netconn *conn)
799799
/* Only tcp pcbs have an acceptmbox, so no need to check conn->type */
800800
/* pcb might be set to NULL already by err_tcp() */
801801
/* drain recvmbox */
802+
#ifdef ESP_LWIP
803+
if (newconn) {
804+
#endif /* ESP_LWIP */
802805
netconn_drain(newconn);
803806
if (newconn->pcb.tcp != NULL) {
804807
tcp_abort(newconn->pcb.tcp);
805808
newconn->pcb.tcp = NULL;
806809
}
807810
netconn_free(newconn);
811+
#ifdef ESP_LWIP
812+
}
813+
#endif /* ESP_LWIP */
808814
}
809815
}
810816
sys_mbox_free(&conn->acceptmbox);

0 commit comments

Comments
 (0)