From f1c7d612ca0e9dc9a7b0a7aebc0be17365883d3f Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 08 九月 2022 09:19:57 +0800
Subject: [PATCH] Merge pull request #590 from ixingqiao/wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java | 18 ++++++++++++------
pom.xml | 14 ++++++++++++++
2 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index 71dd948..f005247 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,6 +60,20 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>redis.clients</groupId>
+ <artifactId>jedis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>io.lettuce</groupId>
+ <artifactId>lettuce-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java
index 4165004..86861af 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java
@@ -26,11 +26,17 @@
@Override
public void process(TimeoutEvent event) {
- // TODO Auto-generated method stub
- CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId();
- String callId = callIdHeader.getCallId();
- SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId);
- SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event);
- errorSubscribe.response(timeoutEventEventResult);
+ try {
+ // TODO Auto-generated method stub
+ CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId();
+ String callId = callIdHeader.getCallId();
+ SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId);
+ SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event);
+ errorSubscribe.response(timeoutEventEventResult);
+ sipSubscribe.removeErrorSubscribe(callId);
+ sipSubscribe.removeOkSubscribe(callId);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
}
--
Gitblit v1.8.0