diff --git a/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/RelayHandler.java b/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/RelayHandler.java index 77071141c..39d48e0a5 100644 --- a/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/RelayHandler.java +++ b/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/RelayHandler.java @@ -37,9 +37,7 @@ public final class RelayHandler extends ChannelInboundHandlerAdapter { @Override public void channelInactive(ChannelHandlerContext ctx) { if (relayChannel.isActive()) { - if (relayChannel.isActive()) { - relayChannel.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE); - } + relayChannel.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE); } }