Rick Jones wrote:
>
> I suppose that if TCP_NODELAY were set on the TCP connection, and the
> server's last bit of real data to send wasn't delayed by say lack of
> receive or congestion window, the FIN would _probably_ be a separate
> segment. However, if that particular "bare FIN" were lost in addition
> to the previous data, the retransmissions of the FIN would most likely
> be piggybacked with the retransmitted data.
Yeah that sounds complicated, I was hoping for some system
reconfiguration
I agree the client should be fixed but we have to work with what's
out there...
> Is your Apache waiting for the FIN reply from the remote, or is it
> simply calling close()?
apache seems to have a home brew "lingering close" because according
to the apache code:
/*
* More machine-dependent networking gooo... on some systems,
* you've got to be *really* sure that all the packets are acknowledged
* before closing the connection, since the client will not be able
* to see the last response if their TCP buffer is flushed by a RST
* packet from us, which is what the server's TCP stack will send
* if it receives any request data after closing the connection.
*
* In an ideal world, this function would be accomplished by simply
* setting the socket option SO_LINGER and handling it within the
* server's TCP stack while the process continues on to the next
request.
* Unfortunately, it seems that most (if not all) operating systems
* block the server process on close() when SO_LINGER is used.
* For those that don't, see USE_SO_LINGER below. For the rest,
* we have created a home-brew lingering_close.
*
* Many operating systems tend to block, puke, or otherwise mishandle
* calls to shutdown only half of the connection. You should define
* NO_LINGCLOSE in ap_config.h if such is the case for your system.
*/
There's more some info in the apache docs at
http://httpd.apache.org/docs/1.3/misc/fin_wait_2.html