Pu Zhibing
8 天以前 1ee76c252f2dbba62e0ec34cccf9eaac51de9083
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/netty/client/NettyClientHandler.java
@@ -69,13 +69,13 @@
    * 当客户端主动断开服务端的链接后,这个通道就是不活跃的。也就是说客户端与服务端的关闭了通信通道并且不可以传输数据
    */
   public void channelInactive(ChannelHandlerContext ctx) throws Exception {
      System.out.println("客户端与服务端通道-关闭:" + ctx.channel().localAddress() + "channelInactive");
      log.error("客户端与服务端通道-关闭:" + ctx.channel().localAddress() + "channelInactive");
   }
   
   @Override
   public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
      ctx.close();
      System.out.println("异常退出:" + cause.getMessage());
      log.error("异常退出:" + cause.getMessage());
   }
   
   public void write(ChannelHandlerContext ctx, String mess) throws Exception {