vince
2024-01-27 facc0ea3fa37091a98aa1e0a0d1081fd32fba28e
src/main/java/com/fzzy/protocol/youxian0/client/ClientHandler.java
@@ -3,6 +3,7 @@
import com.fzzy.api.utils.BytesUtil;
import com.fzzy.api.utils.SpringUtil;
import com.fzzy.protocol.youxian0.analysis.AnalysisService;
import com.fzzy.protocol.youxian0.service.Youxian0GatewayGrainService;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
@@ -31,6 +32,8 @@
        InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().remoteAddress();
        log.info("连接终端掉线,IP={},port={}", socketAddress.getAddress(), socketAddress.getPort());
        ClientEngine.defaultChannel = null;
    }
    @Override
@@ -47,7 +50,11 @@
            analysisService = SpringUtil.getBean(AnalysisService.class);
        }
        analysisService.analysis(socketAddress.getAddress(), socketAddress.getPort(), strMsg);
       try{
           analysisService.analysis(socketAddress.getAddress(), socketAddress.getPort(), strMsg);
       }catch (Exception e){
           log.error(e.getMessage(),e);
       }
    }