| | |
| | | requestCommandAsync(readStatusCommand);//请求状态 |
| | | |
| | | if (this.socketReadResults.isEmpty()) { |
| | | if (System.currentTimeMillis() - shuttleProtocol.getLastOnlineTime() > 1000 * 60) { |
| | | //最后一次上线时间超过60s,认定离线 |
| | | shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.OFFLINE); |
| | | } |
| | | return; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (this.shuttleProtocol.getMode() == 0) { |
| | | return true; |
| | | } |
| | | |
| | | if (!this.shuttleProtocol.getErrorCode().equals("0")) { |
| | | return true; |
| | | } |
| | | |
| | | InnerSuhttleExtend extend = (InnerSuhttleExtend) this.shuttleProtocol.getExtend(); |
| | | boolean res = this.shuttleProtocol.getMode() == 0 |
| | | || !this.shuttleProtocol.getErrorCode().equals("0") |
| | | || extend.getSuspendState() == 1 |
| | | ; |
| | | return res; |
| | | |
| | | if (extend.getSuspendState() == 1) { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | @Override |