Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The complexity of tcp_close() makes the TCP closing control hard to maintain. This patch try to solve it by separating tcp_terminate() and tcp_dataxfer_close() from tcp_close(). Use tcp_terminate() to immediately free all tcp resources, and close data transfer interface by calling tcp_dataxfer_close(). tcp_close() now simply bing TCP connection to closing state. Which makes it safe to call in tcp_rx_fin(). tcp_dataxfer_close() is separated due to early close timing of tcp_xfer_close() which is called by upper-layer to indicate no more data to send or receive.
- Loading branch information
Showing
1 changed file
with
54 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters