| | |
| | | import com.zy.acs.gateway.domain.AgvPackage; |
| | | import io.netty.channel.ChannelHandler; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.handler.codec.DecoderException; |
| | | import io.netty.handler.timeout.IdleState; |
| | | import io.netty.handler.timeout.IdleStateEvent; |
| | | import io.netty.util.ReferenceCountUtil; |
| | |
| | | @Override |
| | | public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { |
| | | log.error("ProtectorHandler exceptionCaught", cause); |
| | | if (cause instanceof IndexOutOfBoundsException) { |
| | | if (cause instanceof IndexOutOfBoundsException || cause instanceof DecoderException) { |
| | | log.error("Received malformed data, waiting for more input......"); |
| | | } else { |
| | | ChannelCache.removeChannel(ctx.channel()); |