Trustin Lee wrote:
On 8/23/07, Pierre-Louis Bonicoli <[EMAIL PROTECTED]> wrote:
Hi,
I change *a lot* the client parts of the codec tutorial, i keep only two
classes : GraphicalCharGenClient and ImageClient (see below).
I don't understand why the thread called "SocketConnector" doesn't stop
(and so the program doesn't terminate).
Probably your application will exit after 1 minute (i.e. default
worker timeout). Try to set SocketConnector.workerTimeout to smaller
value (e.g. 5).
HTH,
Trustin
Hi,
the problem was here (circular strong-reference patterns) :
public class ImageClient extends IoHandlerAdapter
{
[...]
private SocketConnector connector;
[...]
public void connect()
{
connector.setHandler(this);
[...]
}
}
I use a different handler for 'connector', this solve my problem :
connector.setHandler(new MyHandler());
(MyHandler extends IoHandlerAdapter)
Pierre-Louis