自动化立体仓库 - WCS系统
whycq
2023-09-06 b143fe586d7be6c12ec162bf5aebb3a99bff7e32
src/main/java/com/zy/core/netty/handle/ProtectorHandler.java
@@ -3,6 +3,7 @@
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;
@@ -39,6 +40,7 @@
                ctx.close();
                if (!Cools.isEmpty(uuid)){
                    log.info("uuid={} 空闲剔除", uuid);
                    Constant.errorMap.put(Integer.parseInt(uuid), "断开异常");
                }
            }
        }
@@ -62,8 +64,8 @@
    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
        cause.printStackTrace();
        ChannelCache.removeChannel(ctx.channel());
        ctx.close();
//        ChannelCache.removeChannel(ctx.channel());
//        ctx.close();
    }
}