Enabling a client timeout
miracle2k
michael at elsdoerfer.info
Sun Jul 26 06:48:21 EDT 2009
I'd like to have a timeout when connecting to the server, i.e. while
establishing the connection. In various cases (for example if the server's
firewall is configured to drop everything on a particular port), it takes
about two minutes for the connect timeout to occur.
I'm using the ClientBootstrap class, and tried both:
bootstrap.setOption("connectTimeoutMillis", 20000);
bootstrap.setOption("child.connectTimeoutMillis", 20000);
Neither seems to have any effect. Is it a bug, or am I doing it wrong?
I should say that this is on Android.
After stepping and grepping through the source code, I can't find the piece
of code that would apply the option, either. It does appear though as if the
default timeout is set to be 10000, so that wouldn't work either, then.
I am using 3.1.0-CR1.
--
View this message in context: http://n2.nabble.com/Enabling-a-client-timeout-tp3328690p3328690.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list