Commit f1c7d612ca0e9dc9a7b0a7aebc0be17365883d3f

Authored by 648540858
Committed by GitHub
2 parents 60c4f767 fa066029

Merge pull request #590 from ixingqiao/wvp-28181-2.0

1.解决轮询内存增长过快问题
... ... @@ -60,6 +60,20 @@
60 60 <dependency>
61 61 <groupId>org.springframework.boot</groupId>
62 62 <artifactId>spring-boot-starter-data-redis</artifactId>
  63 + <exclusions>
  64 + <exclusion>
  65 + <groupId>redis.clients</groupId>
  66 + <artifactId>jedis</artifactId>
  67 + </exclusion>
  68 + <exclusion>
  69 + <groupId>io.lettuce</groupId>
  70 + <artifactId>lettuce-core</artifactId>
  71 + </exclusion>
  72 + </exclusions>
  73 + </dependency>
  74 + <dependency>
  75 + <groupId>org.apache.commons</groupId>
  76 + <artifactId>commons-pool2</artifactId>
63 77 </dependency>
64 78 <dependency>
65 79 <groupId>org.springframework.boot</groupId>
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java
... ... @@ -26,11 +26,17 @@ public class TimeoutProcessorImpl implements InitializingBean, ITimeoutProcessor
26 26  
27 27 @Override
28 28 public void process(TimeoutEvent event) {
29   - // TODO Auto-generated method stub
30   - CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId();
31   - String callId = callIdHeader.getCallId();
32   - SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId);
33   - SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event);
34   - errorSubscribe.response(timeoutEventEventResult);
  29 + try {
  30 + // TODO Auto-generated method stub
  31 + CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId();
  32 + String callId = callIdHeader.getCallId();
  33 + SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId);
  34 + SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event);
  35 + errorSubscribe.response(timeoutEventEventResult);
  36 + sipSubscribe.removeErrorSubscribe(callId);
  37 + sipSubscribe.removeOkSubscribe(callId);
  38 + } catch (Exception e) {
  39 + e.printStackTrace();
  40 + }
35 41 }
36 42 }
... ...