This almost qualifies as a FAQ.
Alan Cox posted some mail November 1997 on this subject, basically
saying that it is required by RFC 1122. The destination responds with
ICMP port or host unreachable, a pending error is stored, the next send
gets an error. To handle it, if write gets ECONNREFUSED, retry a
couple of times. The initial question and Alan's response can be found
in
http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Nov_97/1634.html
http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Nov_97/1647.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/