From 32c73ff595c9939b342017ffbd8c86bc16877ba6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 17 七月 2023 16:56:58 +0800 Subject: [PATCH] Merge branch '2.6.8' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/media/zlm/SendRtpPortManager.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/SendRtpPortManager.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/SendRtpPortManager.java index 1fb8256..893e52a 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/SendRtpPortManager.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/SendRtpPortManager.java @@ -36,6 +36,13 @@ } public int getNextPort(String mediaServerId) { + String sendIndexKey = KEY + userSetting.getServerId() + "_" + mediaServerId; + MediaSendRtpPortInfo mediaSendRtpPortInfo = (MediaSendRtpPortInfo)redisTemplate.opsForValue().get(sendIndexKey); + if (mediaSendRtpPortInfo == null) { + logger.warn("[鍙戦�佺鍙g鐞哴 鑾峰彇{}鐨勫彂閫佺鍙f椂鏈壘鍒扮鍙d俊鎭�", mediaServerId); + return 0; + } + String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + userSetting.getServerId() + "_*"; List<Object> queryResult = RedisUtil.scan(redisTemplate, key); @@ -48,12 +55,6 @@ } } - String sendIndexKey = KEY + userSetting.getServerId() + "_" + mediaServerId; - MediaSendRtpPortInfo mediaSendRtpPortInfo = (MediaSendRtpPortInfo)redisTemplate.opsForValue().get(sendIndexKey); - if (mediaSendRtpPortInfo == null) { - logger.warn("[鍙戦�佺鍙g鐞哴 鑾峰彇{}鐨勫彂閫佺鍙f椂鏈壘鍒扮鍙d俊鎭�", mediaSendRtpPortInfo); - return 0; - } int port = getPort(mediaSendRtpPortInfo.getCurrent(), mediaSendRtpPortInfo.getStart(), mediaSendRtpPortInfo.getEnd(), checkPort -> sendRtpItemMap.get(checkPort) == null); -- Gitblit v1.8.0