From 3c025a5ac04b7b8fd619ea62d0cfeceb2060cce3 Mon Sep 17 00:00:00 2001 From: xingqiao Date: Fri, 26 Aug 2022 11:03:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E8=BD=AE=E8=AF=A2?= =?UTF-8?q?=E5=86=85=E5=AD=98=E5=A2=9E=E9=95=BF=E8=BF=87=E5=BF=AB=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../timeout/impl/TimeoutProcessorImpl.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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 41650044..86861af1 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 @@ public class TimeoutProcessorImpl implements InitializingBean, ITimeoutProcessor @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 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 timeoutEventEventResult = new SipSubscribe.EventResult<>(event); + errorSubscribe.response(timeoutEventEventResult); + sipSubscribe.removeErrorSubscribe(callId); + sipSubscribe.removeOkSubscribe(callId); + } catch (Exception e) { + e.printStackTrace(); + } } } From d66aab2e8348316e1eac5951de7ddd4dd47edb6b Mon Sep 17 00:00:00 2001 From: xingqiao Date: Fri, 26 Aug 2022 11:53:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=89=94=E9=99=A4lettuce=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E8=BD=AE=E6=92=AD=E5=9C=BA=E6=99=AF=E4=B8=8B=E7=9A=84?= =?UTF-8?q?redis=E8=AF=BB=E5=86=99=E8=B6=85=E6=97=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pom.xml b/pom.xml index 2b9a838c..ebba8a20 100644 --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,20 @@ org.springframework.boot spring-boot-starter-data-redis + + + redis.clients + jedis + + + io.lettuce + lettuce-core + + + + + org.apache.commons + commons-pool2 org.springframework.boot