The following reply was made to PR general/3401; it has been noted by GNATS.
From: Marc Slemko <[EMAIL PROTECTED]> To: Frank Jas <[EMAIL PROTECTED]> Cc: Apache bugs database <[EMAIL PROTECTED]> Subject: Re: general/3401: no shutdown() of client socket in ap_bclose() Date: Fri, 20 Nov 1998 14:07:11 -0800 (PST) On Fri, 20 Nov 1998, Frank Jas wrote: > Thanks for the quick reply, sorry about my delay in replying to you. > In general, I have observed TCP connections going into a TIME-WAIT state > on the NeXT operating system and at least upto Sunos 5.4 (i.e. Solaris 2.4) > if a socket was closed before a shutdown() was performed. TIME_WAIT is a completely normal state for a closed connection to go into for a few minutes after it is closed and there is nothing at all wrong with it. > The behaviour I saw with Apache was I would read from the connection > to the server until EOF, and under certain (seemingly unrelated) > circumstances the close() wouldn't terminate the connection properly. > Running in the debugger, I was able to stop the behavior by calling > shutdown() from the debugger prompt just before the call to close() in > ap_pclosef(). What do you mean by "wouldn't terminate the connection properly"? > When I began programming with sockets I was surprised to observe > that close() without a shutdown() could leave the socket > in a TIME-WAIT state until it timed out on its own. I also That is correct behaviour and there is nothing wrong with it.
