优化级联平台注册的周期时间

This commit is contained in:
648540858
2022-09-02 15:49:40 +08:00
parent 7db2bf7b51
commit ee7ef0bf41
4 changed files with 149 additions and 48 deletions

View File

@@ -125,7 +125,7 @@ public class PlatformServiceImpl implements IPlatformService {
dynamicTask.startDelay(registerTaskKey,
// 注册失败注册成功时由程序直接调用了online方法
()->commanderForPlatform.register(parentPlatform, eventResult -> offline(parentPlatform),null),
parentPlatform.getExpires()*1000);
(parentPlatform.getExpires() - 10) *1000);
final String keepaliveTaskKey = KEEPALIVE_KEY_PREFIX + parentPlatform.getServerGBId();
if (!dynamicTask.contains(keepaliveTaskKey)) {
@@ -164,7 +164,7 @@ public class PlatformServiceImpl implements IPlatformService {
redisCatchStorage.updatePlatformCatchInfo(platformCatch);
}
}),
parentPlatform.getExpires()*1000);
(parentPlatform.getKeepTimeout() - 10)*1000);
}
}
@@ -213,7 +213,6 @@ public class PlatformServiceImpl implements IPlatformService {
param.put("stream", sendRtpItem.getStreamId());
zlmrtpServerFactory.stopSendRtpStream(mediaInfo, param);
}
}
}