Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!IBM.COM!THARENOS From: THARENOS@IBM.COM.UUCP Newsgroups: mod.protocols.tcp-ip Subject: FIN-WAIT-2 to TIME-WAIT transition Message-ID: <021787.121742.tharenos@ibm.com> Date: Tue, 17-Feb-87 20:06:19 EST Article-I.D.: ibm.021787.121742.tharenos Posted: Tue Feb 17 20:06:19 1987 Date-Received: Wed, 18-Feb-87 22:19:45 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 23 Approved: tcp-ip@sri-nic.arpa > The question is, what is a TCP to do if it is in FIN-WAIT-2, it has some > user data that the user hasn't asked for yet, and a FIN comes in? If it > goes immediately to TIME-WAIT (as this TCP does) the user will receive an error > because RFC 793 says that a RECEIVE call while in TIME-WAIT returns "error: Thought I'd take a stab at this one .... The key here is that a FIN implies a PUSH. It is the responsibility of your TCP to asyncronously notify the client that a PUSH has arrived and that a RECEIVE is needed. If the client is well behaved, then a RECEIVE should be forthcoming. However, this is where your question gets tricky. Should TCP wait before entering the TIME-WAIT state for the client to respond with the receive? This adds a client condition to the state table of TCP. If the client was smarter, there would be multiple RECEIVEs queued and TCP could satisfy the FIN(push) immediately and thus enter TIME-WAIT without worry. If, however, your client decides to be a bad client and wait a few hours before issuing the RECEIVE, then your question comes to light. I would venture a guess that TCP should stay in FIN-WAIT-2 until the push signal has been satisfied with a RECEIVE and then enter TIME-WAIT. Mike Tharenos Networking Support and Development IBM, Almaden Research Center 408-927-2727