Pu Zhibing
2025-06-22 22c308a8c1317473c7279f7bf866814c64ef36e9
MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyChannelMap.java
File was renamed from ZuulQYTTravel/src/main/java/com/sinata/zuul/util/echo/NettyChannelMap.java
@@ -1,4 +1,4 @@
package com.sinata.zuul.util.echo;
package com.sinata.push.util.echo;
import io.netty.channel.ChannelHandlerContext;
@@ -91,18 +91,6 @@
   }
   public static synchronized void remove_(ChannelHandlerContext value) {
      Set<String> strings = ctxMap.keySet();
      for(String key : strings){
         ChannelHandlerContext channelHandlerContext = ctxMap.get(key);
         String s = channelHandlerContext.channel().remoteAddress().toString();
         String s1 = value.channel().remoteAddress().toString();
         if(s.equals(s1)){
            channelHandlerContext.close();//关闭通道
            ctxMap.remove(key);
         }
      }
   }
   
   /**
@@ -125,9 +113,4 @@
      map.put(key, value);
   }
   public static synchronized void update_(String key, ChannelHandlerContext value) {
      ctxMap.put(key, value);
   }
}