From c2ef001546ff304f997c0162e71edd0d7e0e228a Mon Sep 17 00:00:00 2001
From: fine <54142345+criver31@users.noreply.github.com>
Date: 星期三, 31 五月 2023 09:35:08 +0800
Subject: [PATCH] Update MobilePositionResponseMessageHandler.java
---
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java
index 423777f..9a642d8 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java
@@ -293,11 +293,14 @@
if (jsonObject.getInteger("code") == 0) {
localPort = jsonObject.getInteger("port");
HookSubscribeForRtpServerTimeout hookSubscribeForRtpServerTimeout = HookSubscribeFactory.on_rtp_server_timeout(ssrc, null, serverItem.getId());
- // 璁㈤槄 zlm鍚姩浜嬩欢, 鏂扮殑zlm涔熶細浠庤繖閲岃繘鍏ョ郴缁�
hookSubscribe.addSubscribe(hookSubscribeForRtpServerTimeout,
(MediaServerItem mediaServerItem, JSONObject response)->{
logger.info("[涓婄骇鐐规挱] {}->鐩戝惉绔彛鍒版湡缁х画淇濇寔鐩戝惉", ssrc);
- keepPort(serverItem, ssrc);
+ int port = keepPort(serverItem, ssrc);
+ if (port == 0) {
+ logger.info("[涓婄骇鐐规挱] {}->鐩戝惉绔彛澶辫触锛岀Щ闄ょ洃鍚�", ssrc);
+ hookSubscribe.removeSubscribe(hookSubscribeForRtpServerTimeout);
+ }
});
logger.info("[涓婄骇鐐规挱] {}->鐩戝惉绔彛: {}", ssrc, localPort);
}else {
--
Gitblit v1.8.0