作者 crossoverJie

:sparkles: Introducing new features.服务端下线逻辑优化

@@ -61,6 +61,8 @@ public class CIMServerHandle extends SimpleChannelInboundHandler<CIMRequestProto @@ -61,6 +61,8 @@ public class CIMServerHandle extends SimpleChannelInboundHandler<CIMRequestProto
61 IdleStateEvent idleStateEvent = (IdleStateEvent) evt; 61 IdleStateEvent idleStateEvent = (IdleStateEvent) evt;
62 if (idleStateEvent.state() == IdleState.READER_IDLE) { 62 if (idleStateEvent.state() == IdleState.READER_IDLE) {
63 63
  64 + LOGGER.info("定时检测服务端是否存活");
  65 +
64 HeartBeatHandler heartBeatHandler = SpringBeanFactory.getBean(ServerHeartBeatHandlerImpl.class) ; 66 HeartBeatHandler heartBeatHandler = SpringBeanFactory.getBean(ServerHeartBeatHandlerImpl.class) ;
65 heartBeatHandler.process(ctx) ; 67 heartBeatHandler.process(ctx) ;
66 } 68 }
@@ -34,4 +34,4 @@ app.zk.root=/route @@ -34,4 +34,4 @@ app.zk.root=/route
34 cim.clear.route.request.url=http://localhost:8083/offLine 34 cim.clear.route.request.url=http://localhost:8083/offLine
35 35
36 # 检测多少秒没有收到客户端心跳后服务端关闭连接 36 # 检测多少秒没有收到客户端心跳后服务端关闭连接
37 -cim.heartbeat.time = 40  
  37 +cim.heartbeat.time = 30