mirror of
https://github.com/apache/nuttx.git
synced 2025-12-19 10:54:48 +08:00
TCP: Send RST if applicaiton 'unlistens()' before we complete the connection sequence.
This commit is contained in:
@@ -486,10 +486,16 @@ found:
|
|||||||
|
|
||||||
nerr("Listen canceled while waiting for ACK on port %d\n",
|
nerr("Listen canceled while waiting for ACK on port %d\n",
|
||||||
tcp->destport);
|
tcp->destport);
|
||||||
|
|
||||||
|
/* Free the connection structure */
|
||||||
|
|
||||||
conn->crefs = 0;
|
conn->crefs = 0;
|
||||||
tcp_free(conn);
|
tcp_free(conn);
|
||||||
conn = NULL;
|
conn = NULL;
|
||||||
goto drop;
|
|
||||||
|
/* And send a reset packet to the remote host. */
|
||||||
|
|
||||||
|
goto reset;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
|
#ifdef CONFIG_NET_TCP_WRITE_BUFFERS
|
||||||
|
|||||||
Reference in New Issue
Block a user