Сhannel closes in 10 seconds

ups handsome.ups at gmail.com
Fri Sep 30 06:27:57 EDT 2011


Hi everyone! 

I have a problem with untimely channel closing. I'm using this code:
    ChannelFactory factory = new NioClientSocketChannelFactory(
    Executors.newCachedThreadPool(),
    Executors.newCachedThreadPool());


    ClientBootstrap bootstrap = new ClientBootstrap(factory);
    bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
                
         public ChannelPipeline getPipeline() throws Exception {
                    
             return Channels.pipeline(new
ConnectRelayingHandler(container));
         }
    });
            
    bootstrap.setOption("tcpNoDelay", true);
    bootstrap.setOption("keepAlive", true);
    bootstrap.setOption("child.keepAlive", true);
    bootstrap.setOption("connectTimeoutMillis", 2000000000);
            
    ChannelFuture future = bootstrap.connect(new InetSocketAddress(host,
port));

After that result channel closes in 10 seconds after connect() called. I
need to keep this channel because I want to reuse it. Please correct me if
I'm wrong.

Thanks,
Yuriy


--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/hannel-closes-in-10-seconds-tp6847300p6847300.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list