I believe join is only to block the function call for certain time. setconnectTimeout means socket will keep trying until timeout. The only way to find out connection failure is catch the RuntimeIOException.
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? > > What is the workertimeout for? > > Thanks for your help. > -- > View this message in context: > http://www.nabble.com/How-to-timeout-connection-attempt--tf4686788s16868.html#a13394156 > Sent from the Apache MINA Support Forum mailing list archive at Nabble.com > . > >
