作者 crossoverJie

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

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