According to TCP/IP Guide, when a TCP session is closed by the Client, it will send a packet with FIN set to the Server and transition to FIN-WAIT-1, however it says:
In this state the client can still receive data from the server but will no longer accept data from its local application to be sent to the server.
So, my question is, what happens if the Server sends data back to the Client? since the application may probably be closed already or not in a state where it can read from the socket anymore, where is the data going to go? Also, is the client going to send ACK back for that data? what happens with the connection then? (RST maybe?)
Note: I don't care about such data, I just want to know if there is potentially a memory leak given that no process read from the TCP buffer, or if the network stack itself will take care of this.