From 1bbba85dc29c11e995978b2fb10d8e5bfc72ded3 Mon Sep 17 00:00:00 2001 From: yx9o Date: Tue, 4 Jan 2022 10:37:16 +0800 Subject: [PATCH] Remove repeated conditional judgments. (#2068) --- .../java/com/alibaba/arthas/tunnel/server/RelayHandler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); } }