> Why forever? Worst case should be that Qpopper never gets an error > whilst sending packets, so it sends all for the message, then waits > for input. While waiting for input it times out and cleans up.
You forget TCP Window: if the receiver doesn't ACK datagrams, your TCP stack will block you until TCP sending buffer empties. If the client is down, the buffer won't be ever emptied, since the receiver is not ACK'ing data and the server TCP stack keeps trying forever while qpopper is simple blocked in the "write" system call. In fact, TCP stack will giveup finally, but my Solaris boxes TCP/IP stacks keep trying for an entire week before give up. The qpopper will notice the failure. Tunning kernel parameters is not a sensible option :-). You can checkout this problem doing the following: a) Server and client in different machines, on the same local Ethernet LAN b) Set the client Ethernet address statically on the ARP server table. This way, server will not timeout the link early by a ARP timeout refresh. c) Start downloading a long message. The transmission must last several seconds. d) In the middle of the transmission, unplug the client's ethernet cable. e) Try commands like "truss" (Solaris) or "ptrace" (Linux) on the server's qpopper and see the process blocked in a "write" o similar system call. f) Count hours, days or weeks (accoring to your system version and tunning:-) before server TCP/IP stack gives up and notifies qpopper about the problem. A simple solution would be doing an "alarm()" just before the "write" calls. The problem would be to choose a sensible timeout, since the link can be slow but not "black-holed". "getsockopt" gives you the TCP/IP buffer size. If you tolerate clients as slow as 1byte/second (fairly slow :-) and kernel TCP/IP buffer size is reported 8192 bytes, for example, you could fix a timeout of 8192 seconds (more that 2 hours). Or you could use a fixed timeouts like "30 minutes". This timeout is not for message sent, but per "write" syscall. -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ [EMAIL PROTECTED] http://www.argo.es/~jcea/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/_/_/_/ PGP Key Available at KeyServ _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz