tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmanola...@yahoo.com
Subject RE: ServerSocket not being closed properly.
Date Tue, 24 Apr 2001 02:19:58 GMT
On Mon, 23 Apr 2001, Arun Katkere wrote:

> In my experience (having started/stopped Tomcat engine programatically via
> ContextManager API in a loop 100s of times), server socket is always closed
> correctly. And looking at 3.2.2 beta 3 source code, both PoolTcpEndpoint and
> SimpleTcpEndpoint close the server socket during shutdownEndpoint().

I think you have a lucky VM/OS - close() on the accepting socket doesn't
stop the accept() thread ( at least not on Linux/JDK1.3 ). 

In general you need to do something to unblock the accept thread, and 3.2
doesn't have this in. 

Regarding the threads - this should be fixed in 3.3, if you still have
problems please let me know.

We may have some other resources that are not restored to their initial
state, please don't assume stop() will move you to the pre-start() state
( not yet - it's not well tested and still need review ). ( but it should
work in most cases :-)

Costin


Mime
View raw message