Any helpers with this. Or is it a bug ?

On 27/04/2008, at 2:49 PM, Daniel Rossi wrote:

There is a portion of a client program I am having issues modifying to include a connect wait timeout. I would like to be able to trap a bad connection and then return an error. Right now mina just sits there waiting to connect to a host which isnt even up. What can I do ive tried a million things.

try {
                        SocketConnector connector = new SocketConnector();
((IoConnectorConfig) connector.getDefaultConfig()).setConnectTimeout(timeout); ConnectFuture future = connector.connect(new InetSocketAddress(server, port), ioHandler);
                } catch (RuntimeIOException e) {
                        log.info(" failed to connect " + server + ":" + port);
                }

Ive tried setting the timeout to 1-5 seconds but still no luck just sits there !

Let me know thanks.



Reply via email to