修复 实时流重复请求则关闭上一次请求的实时流

This commit is contained in:
shikong 2024-02-10 01:13:34 +08:00
parent 41f13af88d
commit 61c24f6b04

View File

@ -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);