On 10/25/07, bea <[EMAIL PROTECTED]> wrote:
>
> Say I have some code as follows:
>
> ConnectFuture future = connector.connect(address, handler);
> future.join(TIMEOUT);
>
> If the connection has not been made when the timeout expires, does mina
> continue to keep trying to make the connection?
>
> The behavior I am looking for is that when the timeout expires, the current
> connection attempt is abandoned. How can I achieve this? Should I use the
> SocketConnectorConfig.setConnectTimeout() method and set the timeout to the
> same value as the join() method?

The connection attempt is automatically canceled after 1 minute by
default.  To change the timeout value, you have to call
SocketConnectorConfig.setConnectTimeout(), as you already noticed.

Unfortunately, there's no way to cancel the connection attempt
immediately.  Good news is that you will be able to do that in 2.0; we
already implemented that.

> What is the workertimeout for?

It's timeout for the I/O connector worker threads.  Please search forum.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to