Skip to content

Commit

Permalink
去除无用的Keep-alive设置项
Browse files Browse the repository at this point in the history
  • Loading branch information
夜色 committed Dec 14, 2016
1 parent e137bc2 commit 65f3c52
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ private void createClient(Listener listener, EventLoopGroup workerGroup, Class<?
b.group(workerGroup)//
.option(ChannelOption.TCP_NODELAY, true)//
.option(ChannelOption.SO_REUSEADDR, true)//
.option(ChannelOption.SO_KEEPALIVE, true)//
.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)//
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 4000)
.channel(clazz);

b.handler(new ChannelInitializer<SocketChannel>() { // (4)
@Override
public void initChannel(SocketChannel ch) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public void onFailure(Throwable cause) {
bootstrap.group(workerGroup)//
.option(ChannelOption.TCP_NODELAY, true)//
.option(ChannelOption.SO_REUSEADDR, true)//
.option(ChannelOption.SO_KEEPALIVE, true)//
.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)//
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 60 * 1000)
.channel(NioSocketChannel.class);
Expand Down

0 comments on commit 65f3c52

Please sign in to comment.