From bb118293fdef0d0fa07a89b513dcba1ef97a29bd Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Tue, 19 Mar 2024 08:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gb28181/mocking/service/device/DeviceProxyService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/device/DeviceProxyService.java b/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/device/DeviceProxyService.java index 1d52f4d..8e0e017 100644 --- a/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/device/DeviceProxyService.java +++ b/gb28181-mocking-service/src/main/java/cn/skcks/docking/gb28181/mocking/service/device/DeviceProxyService.java @@ -621,6 +621,7 @@ public class DeviceProxyService { }); zlmStreamChangeHookService.getUnregistHandler(DEFAULT_ZLM_APP).put(callId,()-> { + schedule.cancel(true); StopSendRtp stopSendRtp = new StopSendRtp(); stopSendRtp.setApp(DEFAULT_ZLM_APP); stopSendRtp.setStream(callId); @@ -719,9 +720,11 @@ public class DeviceProxyService { optionalZlmStreamChangeHookHandler.ifPresent(handler -> { log.warn("流改变事件未结束 ZlmStreamChange {} {}, 强制结束", DEFAULT_ZLM_APP,callId); + handler.handler(); }); optionalZlmStreamNoneReaderHandler.ifPresent(handler -> { log.warn("流无人观看事件未结束 ZlmStreamNoneReader {} {}, 强制结束", DEFAULT_ZLM_APP, callId); + handler.handler(); }); sendBye(request,device,key); }