Re: Сhannel closes in 10 seconds
Norman Maurer
norman.maurer at googlemail.com
Fri Sep 30 06:31:07 EDT 2011
What does "ConnectRelayingHandler" do ?
Please share the code...
Bye,
Norman
2011/9/30 ups <handsome.ups at gmail.com>:
> 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.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
More information about the netty-users
mailing list