dev@grizzly.java.net

Re: About TIME_WAIT remain

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 15 Jun 2009 11:45:38 -0400

Salut,

Bongjae Chang wrote:
> Hi,
>
> When I tested my attached sample, I found that TIME_WAIT connection
> remained for a while on both Windows and Linux.
>
> Test program is very simiple.
>
> 1. create a controller with a server TCPSelectorHandler.
> 2. create a new client socket and connect the server.
> 3. close the client socket and stop the controller.
>
> I don't know why TIME_WAIT state remains though I close both the server
> and client cleanly.
>
> I think you can also reproduce this in some Grizzly's unit test cases
> which use a TCPIOClient like BaseSelectionKeyHandlerTest.
>
> This TIME_WAIT state may be meaningless because Grizzly sets
> setReuseAddress to be true.
>
> But I am curious to know why TIME_WAIT state doesn't disappears fast.

I think this is OS related, e.g the underlying socket will be completely
destroyed based on some OS configuration. I've Googled the TIME_WAIT and
found:

http://www.developerweb.net/forum/showthread.php?t=2941

So I do think we can do something on our side. What do you think?

A+

-- Jeanfrancois


>
> Please advice me.
>
> Thanks.
>
> --
> Bongjae Chang
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net