| | |
| | | import com.core.common.Cools; |
| | | import com.zy.core.netty.AbstractInboundHandler; |
| | | import com.zy.core.netty.cache.ChannelCache; |
| | | import com.zy.core.netty.constant.Constant; |
| | | import com.zy.core.netty.domain.ChPackage; |
| | | import io.netty.channel.ChannelHandler; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | |
| | | ctx.close(); |
| | | if (!Cools.isEmpty(uuid)){ |
| | | log.info("uuid={} 空闲剔除", uuid); |
| | | Constant.errorMap.put(Integer.parseInt(uuid), "断开异常"); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { |
| | | cause.printStackTrace(); |
| | | ChannelCache.removeChannel(ctx.channel()); |
| | | ctx.close(); |
| | | // ChannelCache.removeChannel(ctx.channel()); |
| | | // ctx.close(); |
| | | } |
| | | |
| | | } |