[fix] @Override

public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
       //        super.exceptionCaught(ctx, cause);
               Channel channel = ctx.channel();
               //……
               if (channel.isActive()) ctx.close();
           }
This commit is contained in:
wujiawei 2024-01-24 09:49:52 +08:00
parent 05459f9a04
commit 20f3f9307c

View File

@ -117,4 +117,11 @@ public class NettyServerHandler extends SimpleChannelInboundHandler<NettyProxyMs
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
// super.exceptionCaught(ctx, cause);
Channel channel = ctx.channel();
//
if (channel.isActive()) ctx.close();
}
}