posted 20 years ago
Hi Amit,
From memory, when a socket closes, it is supposed to be a two part process. The closing socket sends a "closing" message, and the other end sends an acknowledgement of that.
After sending the "closing" message, the server goes into "CLOSE_WAIT" while waiting for the acknowledgment. If it does not receive the acknowledgment then eventually it will time out and force the connection closed.
Microsoft used to have a problem with either their OS or their telent client (I forget which) which failed to send the acknowledgment. Many of the human clients I worked with had to change parameters on their server TCP/IP stack just to work around this bug.
As to avoidance: make sure that the client software does properly close the socket.
Regards, Andrew
[ September 01, 2003: Message edited by: Andrew Monkhouse ]