Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java server FIN_WAIT_2 and TIME_WAIT

843790May 3 2008 — edited May 3 2008
Hi,

I�m doing small Java server application. After the connection is closed by server there are following 2 scenarios:
SRV	CLIENT
---FIN/ACK--->
<----ACK------
When checked netstat �a I found that the connection is in the FIN_WAIT_2 state, which I believe is O.K., as the client did not finish the connection properly. Is there anything I should do on the server side or I should just let it be?

2nd scenario (full TCP close scenario):
SRV	CLIENT
---FIN/ACK--->
<----ACK------
<--FIN/ACK----
----ACK------>
When checked netstat �a I found that the connection is in TIME_WAIT state for some time, which is I think also correct.

When client is closing the connection the procedure is:
CLIENT     SRV		
---FIN/ACK--->
<----ACK------
<--FIN/ACK----
----ACK------>
Then netstat does not show anything about closed connection.

Can anybody confirm that described behavior is correct? According to my understanding yes, but I would like to have some more proof. I welcome also some explanation if this can have some negative impact on "something".

Thanks a lot,
BR
STeN
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2008
Added on May 3 2008
2 comments
578 views