From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,cdab6f0e630dcb26,start X-Google-Attributes: gidfc89c,public X-Google-Thread: 10a29b,cdab6f0e630dcb26,start X-Google-Attributes: gid10a29b,public X-Google-Thread: 1164f8,cdab6f0e630dcb26,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-05-06 03:13:50 PST Newsgroups: comp.sys.dec,comp.unix.programmer,comp.protocols.tcp-ip.ibmpc Path: bga.com!news.sprintlink.net!rtp.vnet.net!news1.digex.net!lynx.unm.edu!jobone!newsxfer.itd.umich.edu!gatech!swrinde!elroy.jpl.nasa.gov!decwrl!waikato!comp.vuw.ac.nz!newshost!news From: mikew@gopher.dosli.govt.nz (Mike Williams) Subject: annoyingly persistant TCP connections Message-ID: Followup-To: comp.sys.dec Sender: news@gopher.dosli.govt.nz (USENET News System) Organization: Dept. of Survey & Land Information, NZ. Date: Fri, 6 May 1994 04:43:57 GMT Xref: bga.com comp.sys.dec:3028 comp.unix.programmer:3704 comp.protocols.tcp-ip.ibmpc:4917 We have a PC client which talks to a unix-based server via TCP. The client use a DLL called WSOCKETS, provided with DEC Pathworks 4.1. The server is an oraperl script which is started from inetd(8) (if that's relevant). The server host is a DECstation running Ultrix 4.3A. The protocol is simple: the client sends a (known-length) request to the server, which sends back a (variable-length) reply before exiting. The problem is that if the client crashes for any reason (which it does, reasonably often), the TCP connection is not destroyed, and the server stays around with it's stdout stream blocked. Funnily enough, when the PC is rebooted, the connection springs into life again, the conversation completes, and the server retires peacefully. So, I'm stumped for solutions, and request the wisdom of benevolent TCP/IP gurus. * I'm surprised that the connection isn't closed when the client application dies. Is this a bug in the TCP/IP implementation? (on either the PC or Ultrix end) * Is there any way my server can detect when the client dies? * Can anyone suggest a better protocol which would avoid these problems? Help! ------------------------------------------------------------------ Mike Williams, Dept of Survey & Land Information, NZ. Email: Phone: +64 4 471 0380 "Buy one for the price of two and get the second one FREE!!"