Newsgroups: comp.protocols.tcp-ip Path: utzoo!utgpu!cunews!bnrgate!bwdls61.bnr.ca!usenet From: pww@bwdls55.bnr.ca (Peter Whittaker) Subject: Why not use SO_KEEPALIVE? Message-ID: <1990Nov16.164448.9918@bwdls61.bnr.ca> Keywords: SO_KEEPALIVE bad idea why Sender: usenet@bwdls61.bnr.ca (Use Net) Organization: Bell-Northern Research, Ltd., Ottawa, Ontario, CANADA Date: Fri, 16 Nov 90 16:44:48 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