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 689e276..ebc3bd5 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 @@ -415,7 +415,10 @@ public class DeviceProxyService { @SneakyThrows public void pullLiveStream2Rtp(SIPRequest request,Runnable sendOkResponse,String callId, MockingDevice device, String rtpAddr, int rtpPort, String ssrc){ - String liveCache = CacheUtil.getKey("INVITE", "LIVE", device.getGbDeviceId()); + String liveCacheKey = CacheUtil.getKey("INVITE", "LIVE", device.getGbDeviceId()); + String liveCache = RedisUtil.StringOps.get(liveCacheKey); + RedisUtil.KeyOps.delete(liveCache); + // 关闭已存在的实时流 bye 订阅(如果存在) subscribe.getByeSubscribe().delPublisher(liveCache);