c - TCP connection - delayed close() and RST -


I have run TCP client and TCP server on both machines on RHEL 5.3.

  • I'm killing the server and the client is sent to FIN. ACK is sent back by the customer's OS.

  • The client realizes that close (zero to back) (zero to read) and the counterfeit closes after about 90 seconds. At this stage, I verified the netstate on both the sides and as expected (FIN on the customer's website and customer on CLOSE_WAIT).

  • After 90 seconds the customer closes (), the customer's OS sends FIN to the server, but in response we receive RST from the server and not as expected.

I have seen many times that close to "delay", the customer's OS

Please note that in either case, There is no pending reading packet and the SO_LINGER option is not active.

Any thoughts?

rst indicates that some "data" was lost in this situation In, "data" is information that the client side had made the mistake explicitly closed - the client code from FIN was not reported (because it was killed).

In other words, RST tells the client that the client never saw the end-stream of the server.


Comments