From bf8fbf4927d8ddec69893a6bebb79dadf1b4225d Mon Sep 17 00:00:00 2001 From: chenzhangyue Date: Fri, 1 Sep 2023 17:22:53 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E8=BF=99=E9=87=8C=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8key=E6=89=8D=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/MediaServerServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java index f8c1ba18..6bbb4bc3 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java @@ -128,7 +128,7 @@ public class MediaServerServiceImpl implements IMediaServerService { continue; } // 更新 - if (ssrcFactory.hasMediaServerSSRC(mediaServerItem.getId())) { + if (!ssrcFactory.hasMediaServerSSRC(mediaServerItem.getId())) { ssrcFactory.initMediaServerSSRC(mediaServerItem.getId(), null); } // 查询redis是否存在此mediaServer @@ -229,7 +229,7 @@ public class MediaServerServiceImpl implements IMediaServerService { mediaServerMapper.update(mediaSerItem); MediaServerItem mediaServerItemInRedis = getOne(mediaSerItem.getId()); MediaServerItem mediaServerItemInDataBase = mediaServerMapper.queryOne(mediaSerItem.getId()); - if (mediaServerItemInRedis == null || ssrcFactory.hasMediaServerSSRC(mediaSerItem.getId())) { + if (mediaServerItemInRedis == null || !ssrcFactory.hasMediaServerSSRC(mediaSerItem.getId())) { ssrcFactory.initMediaServerSSRC(mediaServerItemInDataBase.getId(),null); } String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId() + "_" + mediaServerItemInDataBase.getId(); @@ -411,7 +411,7 @@ public class MediaServerServiceImpl implements IMediaServerService { } mediaServerMapper.update(serverItem); String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId() + "_" + zlmServerConfig.getGeneralMediaServerId(); - if (ssrcFactory.hasMediaServerSSRC(serverItem.getId())) { + if (!ssrcFactory.hasMediaServerSSRC(serverItem.getId())) { ssrcFactory.initMediaServerSSRC(zlmServerConfig.getGeneralMediaServerId(), null); } redisTemplate.opsForValue().set(key, serverItem);