mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
Partial fix for bug #15926, flushing TCP output in do_close().
This commit is contained in:
parent
d8922d0410
commit
a82e02ef15
@ -761,7 +761,10 @@ do_close(struct api_msg_msg *msg)
|
|||||||
#if LWIP_TCP
|
#if LWIP_TCP
|
||||||
case NETCONN_TCP:
|
case NETCONN_TCP:
|
||||||
if (msg->conn->pcb.tcp->state == LISTEN) {
|
if (msg->conn->pcb.tcp->state == LISTEN) {
|
||||||
err = tcp_close(msg->conn->pcb.tcp);
|
err = tcp_close(msg->conn->pcb.tcp);
|
||||||
|
}
|
||||||
|
else if (msg->conn->pcb.tcp->state == CLOSE_WAIT) {
|
||||||
|
err = tcp_output(msg->conn->pcb.tcp);
|
||||||
}
|
}
|
||||||
msg->conn->err = err;
|
msg->conn->err = err;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user