提交者
GitHub
Merge pull request #7 from crossoverJie/cim
CIM
正在显示
2 个修改的文件
包含
1 行增加
和
5 行删除
| @@ -37,8 +37,6 @@ public class CIMClientHandle extends SimpleChannelInboundHandler<CIMResponseProt | @@ -37,8 +37,6 @@ public class CIMClientHandle extends SimpleChannelInboundHandler<CIMResponseProt | ||
| 37 | IdleStateEvent idleStateEvent = (IdleStateEvent) evt ; | 37 | IdleStateEvent idleStateEvent = (IdleStateEvent) evt ; |
| 38 | 38 | ||
| 39 | if (idleStateEvent.state() == IdleState.WRITER_IDLE){ | 39 | if (idleStateEvent.state() == IdleState.WRITER_IDLE){ |
| 40 | - //LOGGER.info("已经 10 秒没有发送信息!"); | ||
| 41 | - //向服务端发送消息 | ||
| 42 | CIMRequestProto.CIMReqProtocol heartBeat = SpringBeanFactory.getBean("heartBeat", CIMRequestProto.CIMReqProtocol.class); | 40 | CIMRequestProto.CIMReqProtocol heartBeat = SpringBeanFactory.getBean("heartBeat", CIMRequestProto.CIMReqProtocol.class); |
| 43 | ctx.writeAndFlush(heartBeat) ; | 41 | ctx.writeAndFlush(heartBeat) ; |
| 44 | } | 42 | } |
| @@ -150,9 +150,7 @@ public class RouteRequestImpl implements RouteRequest { | @@ -150,9 +150,7 @@ public class RouteRequestImpl implements RouteRequest { | ||
| 150 | if (!response.isSuccessful()){ | 150 | if (!response.isSuccessful()){ |
| 151 | throw new IOException("Unexpected code " + response); | 151 | throw new IOException("Unexpected code " + response); |
| 152 | } | 152 | } |
| 153 | - if (!response.isSuccessful()){ | ||
| 154 | - throw new IOException("Unexpected code " + response); | ||
| 155 | - } | 153 | + |
| 156 | 154 | ||
| 157 | String json = response.body().string() ; | 155 | String json = response.body().string() ; |
| 158 | OnlineUsersResVO onlineUsersResVO = JSON.parseObject(json, OnlineUsersResVO.class); | 156 | OnlineUsersResVO onlineUsersResVO = JSON.parseObject(json, OnlineUsersResVO.class); |
-
请 注册 或 登录 后发表评论