liusuyi
2025-10-14 8aa9e121554b84735c8ec6139bd095ea3acb05e7
ard-work/src/main/java/com/ard/work/component/netty/handler/ClientHandler.java
@@ -93,16 +93,7 @@
        String host = remoteAddress.getHostString();
        int port = remoteAddress.getPort();
        log.error("与六合服务{}:{}连接断开!", host, port);
        TyTcpServerCache.putTcpServerCache(host + ":" + port, false);
        ctx.channel().eventLoop().schedule(() -> {
            log.error("六合服务端链接不上,开始重连操作...");
            try {
                tyTcpClientManager.initConnection(serverId,host, port);
            } catch (Exception e) {
                log.error("六合服务端连接异常: {}", e.getMessage());
            }
        }, 5, TimeUnit.SECONDS);
        TyTcpServerCache.putTcpServerCache(serverId, false);
        super.channelInactive(ctx);
    }