Commit 3969ca4c authored by zengtianlai3's avatar zengtianlai3

删除不必要的null检查代码。

parent 92d8a681
...@@ -33,17 +33,16 @@ public class ForwardClient { ...@@ -33,17 +33,16 @@ public class ForwardClient {
channelInitializer = new ForwardChannelInitializer(handler); channelInitializer = new ForwardChannelInitializer(handler);
EventLoopGroup eventLoopGroup = new NioEventLoopGroup(); EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
bootstrap = new Bootstrap(); bootstrap = new Bootstrap();
if (bootstrap != null) { try {
try { bootstrap
bootstrap .channel(NioSocketChannel.class)
.channel(NioSocketChannel.class) .option(ChannelOption.SO_KEEPALIVE, true)
.option(ChannelOption.SO_KEEPALIVE, true) .group(eventLoopGroup)
.group(eventLoopGroup) .handler(channelInitializer);
.handler(channelInitializer); } catch (IllegalStateException ex) {
} catch (IllegalStateException ex) { log.error(ex.getMessage());
log.error(ex.getMessage());
}
} }
} }
public void startTcp(String host, int port, String appId) { public void startTcp(String host, int port, String appId) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment