From 6e8071d820aa55173e64fd25609caa3b6b9af98a Mon Sep 17 00:00:00 2001
From: bradyx <xushanbin@zdjtcm.com>
Date: 星期三, 15 五月 2024 13:52:16 +0800
Subject: [PATCH] fix: 系统启动时,停止已启动国标推流抛出异常被系统捕获,启动服务失败。

---
 src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeHolder.java |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeHolder.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeHolder.java
index d932a20..6557bba 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeHolder.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeHolder.java
@@ -52,7 +52,7 @@
         Runnable runnable = dynamicTask.get(taskOverdueKey);
         if (runnable instanceof ISubscribeTask) {
             ISubscribeTask subscribeTask = (ISubscribeTask) runnable;
-            subscribeTask.stop();
+            subscribeTask.stop(null);
         }
         // 娣诲姞浠诲姟澶勭悊璁㈤槄杩囨湡
         dynamicTask.stop(taskOverdueKey);
@@ -87,7 +87,7 @@
         Runnable runnable = dynamicTask.get(taskOverdueKey);
         if (runnable instanceof ISubscribeTask) {
             ISubscribeTask subscribeTask = (ISubscribeTask) runnable;
-            subscribeTask.stop();
+            subscribeTask.stop(null);
         }
         // 娣诲姞浠诲姟澶勭悊璁㈤槄杩囨湡
         dynamicTask.stop(taskOverdueKey);
@@ -103,6 +103,16 @@
         return platforms;
     }
 
+    public List<String> getAllMobilePositionSubscribePlatform() {
+        List<String> platforms = new ArrayList<>();
+        if(!mobilePositionMap.isEmpty()) {
+            for (String key : mobilePositionMap.keySet()) {
+                platforms.add(mobilePositionMap.get(key).getId());
+            }
+        }
+        return platforms;
+    }
+
     public void removeAllSubscribe(String platformId) {
         removeMobilePositionSubscribe(platformId);
         removeCatalogSubscribe(platformId);

--
Gitblit v1.8.0