删除HeartbeatHandler里idle state日志打印;app增加收到命令比较,如果跟上一次发的信息相同则不写入日志
| | |
| | | MyLog.e(TAG, "OnTerminate()"); |
| | | } |
| | | |
| | | private String lastStr; |
| | | @Override |
| | | public void callBackMsg(final int cmd, String json) { |
| | | // MyLog.d(TAG, String.format("收到命令[%d],Json内容为%s", cmd, json)); |
| | | String strConent = String.format("收到命令[%d],Json内容为%s", cmd, json); |
| | | if (strConent.equalsIgnoreCase(lastStr)){ |
| | | |
| | | }else{ |
| | | |
| | | MyLog.d(TAG,strConent ); |
| | | lastStr = strConent; |
| | | } |
| | | switch (cmd) { |
| | | case Constant.NDK_START: |
| | | sendVechileInfo(); |
| | |
| | | super.userEventTriggered(ctx, evt); |
| | | if (evt instanceof IdleStateEvent){ |
| | | IdleState state = ((IdleStateEvent)evt).state(); |
| | | MyLog.i("Netty TCP Idlestate="+state.name()); |
| | | switch (state){ |
| | | case READER_IDLE: |
| | | // 规定时间内没收到服务端心跳包响应,进行重连操作 |