zengh
2021-08-12 7d66a578a2b18112825a0f8aa81d40ce5a37d76d
src/main/java/org/springblade/modules/webscoket/WebSocketHandler.java
@@ -15,7 +15,6 @@
import io.netty.util.AttributeKey;
import io.netty.util.CharsetUtil;
import org.springblade.modules.nettyServer.NettyConfig;
import org.springblade.modules.suser.service.ISuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -27,9 +26,6 @@
   private WebSocketServerHandshaker handshaker;
   private  String on=null;
   @Autowired
   private  ISuserService suserService;
   private static WebSocketHandler webSocketHandler;
@@ -116,10 +112,6 @@
         }
      }
//      TextWebSocketFrame tws = new TextWebSocketFrame(new Date().toString()
@@ -174,6 +166,7 @@
//         f.addListener(ChannelFutureListener.CLOSE);
//      }
   }
   @Override
   public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
      cause.printStackTrace();
@@ -182,6 +175,7 @@
   /**
    * 删除用户与channel 对应关系
    *
    * @param ctx
    */
   private void removeUserId(ChannelHandlerContext ctx){