What happens if the Client crashes and never closes the connection? Or the server crashes before being able to send a ACK FIN packet. Are those cases implemented in software?

  • 4
    The TCP state machine has timeouts for this very situation. – Ricky Jul 7 at 12:06

They are, yes. If hosts A and B have a connection, and the program on host B crashes, or the host B reboots to the same IP address, or its IP is taken over by a different system, then IP address B will send TCP RST responses upon receiving segments from host A. This will result in host A's connection failing with error connection reset by peer.

If host B goes down and doesn't reboot, and nothing else takes its place on that IP address, the TCP connection on host A will eventually time-out as Ricky mentioned.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.