优化国标级联心跳失败再次注册的逻辑
parent
c084d6c98a
commit
205f1f1f60
|
@ -78,7 +78,6 @@ public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent
|
||||||
}
|
}
|
||||||
taskExecutor.execute(()->{
|
taskExecutor.execute(()->{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
String sn = getText(rootElement, "SN");
|
String sn = getText(rootElement, "SN");
|
||||||
String channelId = getText(rootElement, "DeviceID");
|
String channelId = getText(rootElement, "DeviceID");
|
||||||
RecordInfo recordInfo = new RecordInfo();
|
RecordInfo recordInfo = new RecordInfo();
|
||||||
|
|
|
@ -241,8 +241,11 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||||
// 此时是第三次心跳超时, 平台离线
|
// 此时是第三次心跳超时, 平台离线
|
||||||
if (platformCatch.getKeepAliveReply() == 2) {
|
if (platformCatch.getKeepAliveReply() == 2) {
|
||||||
// 设置平台离线,并重新注册
|
// 设置平台离线,并重新注册
|
||||||
logger.info("[国标级联] 三次心跳超时, 平台{}({})离线", parentPlatform.getName(), parentPlatform.getServerGBId());
|
logger.info("[国标级联] 三次心跳失败, 平台{}({})离线", parentPlatform.getName(), parentPlatform.getServerGBId());
|
||||||
offline(parentPlatform, false);
|
offline(parentPlatform, false);
|
||||||
|
}else {
|
||||||
|
platformCatch.setKeepAliveReply(platformCatch.getKeepAliveReply() + 1);
|
||||||
|
redisCatchStorage.updatePlatformCatchInfo(platformCatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, eventResult -> {
|
}, eventResult -> {
|
||||||
|
|
Loading…
Reference in New Issue