Otto Moerbeek wrote:
I'm only talking about the tear-down. The three-way handshake happens
before that, both sockets are in ESTABSLIHED state. You have to read
half-close as a verb (action), and half-open as a description of the
state of the connection.
Check the state transition diagram, and maybe do some reading in
Stevens's TCP/Illustrated Volume I (which has the state diagram on the
inside cover ;-)
I did a lots of reading and I cleared my miss understanding looks like
and see where I confuse myself:
1) A socket gets into CLOSE_WAIT when the remote side sends a FIN and
the local side sends an ACK, but has not yet sent it's FIN.
2) A socket gets into FIN_WAIT_2 when the local side closes the socket
and sends a FIN (FIN_WAIT_1) and then receives an ACK for that FIN but
has not yet received a FIN from the remote side.
I got confuse as I can't never see any CLOSE_WAIT on my server, no
complain for sure but I see a FIN_WAIT_2 and obviously confuse the two.
I am puzzled as to why they would get so many CLOSE_WAIT and I guess it
might be an under power server may be that when the httpd child process
is done, that the master, or what not don't have time to process it and
as such keep the socket open because of that. Not sure, but I guess
possible.
In any case, I appreciate the reply and I sure clear that part of the
handshake anyway, so I will not make the same mistakes again. (;>
Best,
Daniel