Commit 3c025a5ac04b7b8fd619ea62d0cfeceb2060cce3
1 parent
942c5caa
1.解决轮询内存增长过快问题
Showing
1 changed file
with
12 additions
and
6 deletions
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,11 +26,17 @@ public class TimeoutProcessorImpl implements InitializingBean, ITimeoutProcessor | ||
| 26 | 26 | ||
| 27 | @Override | 27 | @Override |
| 28 | public void process(TimeoutEvent event) { | 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 | } |