I am trying to make a netty connection for a project and I am successfully 
able to make it. However, after 30 seconds the connection becomes inactive. 
I'm purposefully not using the connection for something because it is a 
test connection but I want to keep it active for future tasks even after 30 
seconds are over. This is my code to create the connection:

try {
        Bootstrap b = new Bootstrap();
        b.option(ChannelOption.TCP_NODELAY, true);
        b.option(ChannelOption.SO_KEEPALIVE, true);
        b.group(new NioEventLoopGroup());
        b.handler(new ReadTimeoutHandler(50));

        InetSocketAddress sa = new InetSocketAddress("--------IP 
HIDDEN--------", 25454);
        ChannelFuture f = b.connect(sa.getAddress(), sa.getPort()).sync(); // 
        Channel chan = f.channel();
        //Channel becomes inactive after 30 seconds
    } catch (Exception e) {

You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netty+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to