增加zlm心跳超时的判定时间
This commit is contained in:
parent
e3bbb4a066
commit
d79b378f3d
@ -405,7 +405,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|||||||
}
|
}
|
||||||
final String zlmKeepaliveKey = zlmKeepaliveKeyPrefix + serverItem.getId();
|
final String zlmKeepaliveKey = zlmKeepaliveKeyPrefix + serverItem.getId();
|
||||||
dynamicTask.stop(zlmKeepaliveKey);
|
dynamicTask.stop(zlmKeepaliveKey);
|
||||||
dynamicTask.startDelay(zlmKeepaliveKey, new KeepAliveTimeoutRunnable(serverItem), serverItem.getHookAliveInterval() * 1000);
|
dynamicTask.startDelay(zlmKeepaliveKey, new KeepAliveTimeoutRunnable(serverItem), (serverItem.getHookAliveInterval() + 5) * 1000);
|
||||||
publisher.zlmOnlineEventPublish(serverItem.getId());
|
publisher.zlmOnlineEventPublish(serverItem.getId());
|
||||||
logger.info("[ZLM] 连接成功 {} - {}:{} ",
|
logger.info("[ZLM] 连接成功 {} - {}:{} ",
|
||||||
zlmServerConfig.getGeneralMediaServerId(), zlmServerConfig.getIp(), zlmServerConfig.getHttpPort());
|
zlmServerConfig.getGeneralMediaServerId(), zlmServerConfig.getIp(), zlmServerConfig.getHttpPort());
|
||||||
@ -438,6 +438,8 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|||||||
@Override
|
@Override
|
||||||
public void zlmServerOffline(String mediaServerId) {
|
public void zlmServerOffline(String mediaServerId) {
|
||||||
delete(mediaServerId);
|
delete(mediaServerId);
|
||||||
|
final String zlmKeepaliveKey = zlmKeepaliveKeyPrefix + mediaServerId;
|
||||||
|
dynamicTask.stop(zlmKeepaliveKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -657,7 +659,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
|||||||
}
|
}
|
||||||
final String zlmKeepaliveKey = zlmKeepaliveKeyPrefix + mediaServerItem.getId();
|
final String zlmKeepaliveKey = zlmKeepaliveKeyPrefix + mediaServerItem.getId();
|
||||||
dynamicTask.stop(zlmKeepaliveKey);
|
dynamicTask.stop(zlmKeepaliveKey);
|
||||||
dynamicTask.startDelay(zlmKeepaliveKey, new KeepAliveTimeoutRunnable(mediaServerItem), mediaServerItem.getHookAliveInterval() * 1000);
|
dynamicTask.startDelay(zlmKeepaliveKey, new KeepAliveTimeoutRunnable(mediaServerItem), (mediaServerItem.getHookAliveInterval() + 5) * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MediaServerItem getOneFromDatabase(String mediaServerId) {
|
private MediaServerItem getOneFromDatabase(String mediaServerId) {
|
||||||
|
@ -179,7 +179,8 @@ public class PlatformController {
|
|||||||
commanderForPlatform.register(parentPlatform, null, null);
|
commanderForPlatform.register(parentPlatform, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (parentPlatformOld != null && parentPlatformOld.isEnable() && !parentPlatform.isEnable()) { // 关闭启用时注销
|
} else if (parentPlatformOld != null && parentPlatformOld.isEnable()) {
|
||||||
|
// 关闭启用时注销
|
||||||
commanderForPlatform.unregister(parentPlatform, null, null);
|
commanderForPlatform.unregister(parentPlatform, null, null);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user