| | |
| | | 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); |
| | | } |
| | | |