接收所有notify请求,即使没有订阅

This commit is contained in:
648540858
2022-04-15 18:04:19 +08:00
parent e6ee7fe747
commit 25102229f6
4 changed files with 92 additions and 4 deletions

View File

@@ -76,7 +76,6 @@ public class DynamicTask {
*/
public void startDelay(String key, Runnable task, int delay) {
stop(key);
System.out.println("定时任务开始了");
Date starTime = new Date(System.currentTimeMillis() + delay);
ScheduledFuture future = futureMap.get(key);
@@ -100,7 +99,6 @@ public class DynamicTask {
}
public void stop(String key) {
System.out.println("定时任务结束了");
if (futureMap.get(key) != null && !futureMap.get(key).isCancelled()) {
futureMap.get(key).cancel(true);
Runnable runnable = runnableMap.get(key);

View File

@@ -48,6 +48,7 @@ public class SipLayer{
properties.setProperty("javax.sip.STACK_NAME", "GB28181_SIP");
properties.setProperty("javax.sip.IP_ADDRESS", sipConfig.getMonitorIp());
properties.setProperty("gov.nist.javax.sip.LOG_MESSAGE_CONTENT", "true");
properties.setProperty("gov.nist.javax.sip.DELIVER_UNSOLICITED_NOTIFY", "true"); // 接收所有notify请求即使没有订阅
/**
* sip_server_log.log 和 sip_debug_log.log public static final int TRACE_NONE =
* 0; public static final int TRACE_MESSAGES = 16; public static final int

View File

@@ -42,7 +42,6 @@ public class MobilePositionSubscribeHandlerTask implements ISubscribeTask {
@Override
public void run() {
logger.info("执行MobilePositionSubscribeHandlerTask");
if (platform == null) return;
SubscribeInfo subscribe = subscribeHolder.getMobilePositionSubscribe(platform.getServerGBId());
if (subscribe != null) {
@@ -71,7 +70,6 @@ public class MobilePositionSubscribeHandlerTask implements ISubscribeTask {
}
}
}
logger.info("结束执行MobilePositionSubscribeHandlerTask");
}
@Override