修复集群播放BUG
This commit is contained in:
@@ -27,6 +27,8 @@ public interface IRedisCatchStorage {
|
||||
*/
|
||||
void updateWVPInfo(ServerInfo serverInfo, int time);
|
||||
|
||||
void removeOfflineWVPInfo(String serverId);
|
||||
|
||||
/**
|
||||
* 发送推流生成与推流消失消息
|
||||
* @param jsonObject 消息内容
|
||||
|
||||
@@ -84,6 +84,13 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
redisTemplate.opsForZSet().add(setKey, userSetting.getServerId(), System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeOfflineWVPInfo(String serverId) {
|
||||
String setKey = VideoManagerConstants.WVP_SERVER_LIST;
|
||||
// 首次设置就设置为0, 后续值越小说明越是最近启动的
|
||||
redisTemplate.opsForZSet().remove(setKey, serverId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStreamChangeMsg(String type, JSONObject jsonObject) {
|
||||
String key = VideoManagerConstants.WVP_MSG_STREAM_CHANGE_PREFIX + type;
|
||||
|
||||
Reference in New Issue
Block a user