Closed ujos closed 6 years ago
Agreed but there may be a race condition in which side closes the TCP connection first.
Why don't we just leave it up to the initiator to send the TCP FIN message first? If the acceptor sends the TCP FIN first for some reason and it gets ACK from initiator then acceptor will close connection and not be able to send ACK in response to TCP FIN from initiator
Assuming that Terminate response has been sent by acceptor then:
Acceptor sends TCP FIN Initiator sends ACK Acceptor has closed connection Initiator sends TCP FIN
If the acceptor sends the TCP FIN first for some reason and it gets ACK from initiator
Which ACK?
Upon receiving Terminate message, acceptor of Terminate should not wait for TCP FIN message from initiator. It can send TCP FIN just after Terminate message. So sequence will be following:
Initiator
Acceptor:
Does it make sense?