Newsgroups: comp.protocols.tcp-ip
Path: utzoo!utgpu!cunews!bnrgate!bwdls61.bnr.ca!dbruce
From: pww@bwdls55.bnr.ca (Peter Whittaker)
Subject: Why not use SO_KEEPALIVE?
Message-ID: <1990Nov17.033140.18762@bwdls61.bnr.ca>
Keywords: SO_KEEPALIVE bad idea why
Sender: dbruce@bwdls61.bnr.ca (Dwayne Bruce)
Organization: Bell-Northern Research, Ltd., Ottawa, Ontario, CANADA
Date: Sat, 17 Nov 90 03:31:40 GMT

Hello, I've been hearing bad things about SO_KEEPALIVE recently, but 
these "bad things" have amounted to nothing more than opinion - no one
has yet been able to give a substantive reason not to use it (with the 
possible exception of "no one uses it, so it has never been debugged, so it's
probably flakey, so don't use it" - a la Catch-22).

So, are there in fact substantive reasons not to use SO_KEEPALIVE?

(This matter arose from an application that uses SO_KEEPALIVE, naturally
enough, with apparent negative impact:  the server application gets killed
(KILL -9) but the TCP socket stays up, connected to the remote client,
with the server side sending ACK packets every now and again, just enough
of them to be annoying.  When we eventually want to restart the server, we
have to reboot or search and destroy all clients, because the address is in
use.  As a fix, we're going to use SO_REUSEADDR as well as SO_KEEPALIVE.
If there are substantive reasons not to use SO_KEEPALIVE, we'll recommend
that it be removed from the software).

Thanks,


--
Peter Whittaker      [~~~~~~~~~~~~~~~~~~~~~~~~~~]   Open Systems Integration
pww@bnr.ca           [                          ]   Bell Northern Research 
Ph: +1 613 765 2064  [                          ]   P.O. Box 3511, Station C
FAX:+1 613 763 3283  [__________________________]   Ottawa, Ontario, K1Y 4H7
