Clients closing connections RFC 821 recommends that the client send QUIT, and wait for the QUIT response, before closing the connection. There are a few broken TCP implementations, such as MacTCP 2.0.6, that fail to acknowledge TCP FINs after a local close. Servers must not throw away messages that they accepted during such connections. Servers closing connections RFC 821 recommends that the server not close the connection until it receives a QUIT request and sends the response. Servers close connections without QUIT in some circumstances, for example because of a crash or timeout.
Some servers send an asynchronous response before closing the connection after a timeout.
Similarly, the server should not wait forever for a response from the client. I use a default timeout of 1200 seconds for each packet. Timeouts below 600 seconds are dangerous in today's Internet. On the other hand, some dumb clients wait only 60 seconds for a greeting . Measurements show that this sort of tweaking does not make a significant difference in average resource consumption.